jquery

jQuery get(), Shadowbox, return the whole html of the containing div

Related to my earlier question (thanks for your response Cryo), I have a further question for the javaScript mavens here. Given an html structure like this: <content> <div entry> <div rubric> <a name> </div> <div content block> <p> <a links> </div> </div entry>...

jquery add remove class

Hi. I have 4 anchors, I want to add a class of current to an anchor as it is clicked and remove the class from the other 3 at the same time here's my code what am I doing doing wrong please? if ($("ul#thumb a").hasClass("current") { $("ul#thumb a").removeClass("current"); $(this).addClass("current"); }); and my html looks like...

jquery + flash: looking for plugin that resize images before upload

i'm looking for a jquery plugin that can upload multiple images. I've tried uploadify and it works well. But with huge images it's very slow. is There anything like uploadify that resize also the images before upload them? thanks ...

Best way to reorder dom elements based on json data

Once I create dom elements base on json data with jtemplates, what is the best way to reorder those elements based on changes to the json data (sorting, filtering, etc.). ...

How do I build a gracefully-degrading HTML5 Range?

I'd like to use the <input type='range' /> from HTML5 for browsers that support it and degrade to a <select /> if not. I'm using Ruby-on-Rails, so failing all else, I could do something like this on the server-side. I would prefer, though, to have something more inline with the idea of progressive enhancement done via Javascript. Bonus ...

jquery Help with getting Id of table row

Hello, I am doing an AJAX request with Jquery and PHP what I am doing is looping through an array and producing a table, each loop a new is created and an id is given to it, when they click the read me link the ajax and some more content is returned, on clicking read more I want the associated table row to be removed from the table is th...

Javascript/Jquery: .css pixel-values

Hi! I just realised there is a difference between <foo>.css('marginTop') (which I thought is the standard jquery-notation) and <foo>.css('margin-top') (which I thought was non-standard). If has margin-top: 3em; (for example), the first notation gives me 3em, the second notation gives me 48px (which is 3em in Pixels). I like this...

Asp.Net Add UserControl to a Page

I have an ASP.Net web site and on one of the pages I'm using a repeater to render several iterations of a UserControl, that UserControl contains a second UserContol that has two text boxes that my User must enter information into. I want to be able to have my user push a button and add another instance of the second UserControl (with th...

jQuery live doesn't appear to bind click event.

The dynamically added links (classnames .divToggle and .removeDiv) only function if clicked twice the first time. What is preventing them from working properly right away? $(document).ready(function(){ // adds click event to links. $('a.divToggle').live('click', function(event) { // Toggles the visibility of divs. event.preventD...

ASP.NET MVC and JQuery Dialog postback

hi, I have a simple List view in MVC that renders some products. As soon as 1 product is selected I open a JQuery modal popup in this way: function showDetails(id) { hostId = id; $("#detailDialog").load('/Product/Details/' + hostId); $("#detailDialog").dialog("open"); } The modal popup correctly loads the partial view ...

jQuery remove tag to custom element

I have the following markup generated dynamically with a split and join function <span> <em style="position: relative;">T</em> <em class="good" style="position: relative;">H</em> <em style="position: relative;">E</em> <em style="position: relative;">S</em> </span> I want to remove the em tag for the elements that do no...

childNodes.length 0 in Chrome / Correct In IE & FF

I have a div with children that I need to crawl looking for specific links. The HTML looks like so: <div id="ctl00_LeftNav"> <h3> <a href="../App_Templates/#" rel="0">Menu 1</a></h3> <div> <p> <span> <div style="padding-left: 0px; font-weight: bold;"> <a href="javas...

how to create an ajax pop pulling a data from db ?

Hi, can someone tell me how to create a nice small tooltip like ajax pop-up ? the situation is like this, I am pulling the $row->title from the db, and then I presented it as a link like this <?php foreach($task->result() as $row): ?> <tr> <td><a href=#><?php echo $row->title; ?></a></td> </tr> <?php endforeach; ?> wh...

How to enable only digits to enter into the Texbox on ASP.NET MVC Page?

Hi I have an ASP.NET MVC Page along with Zipcode, Phonenumber & Fax. Now i want to disable all other keys and only enable digits from the keyboard while typing on these textboxes. Appreciate your responses. As of now this is how the form is validated using Validation Plugin. Zip* <td CssClass="Form_Value"><%= Html.TextBox("Zi...

Inserting a Quicktime Player similar to apple.com

Looking at Apple Website they do an outstanding job with the quicktime movies they show off to their users. When I've included quicktime links before, the player that actually shows to users is quite bland, and across browsers really differs from what it looks like in safari, chrome, ie, firefox. Apple seems to handle all these conditi...

check marking all the checkbox using jquery on click of a button

This is how my table structure looks, <table> <tbody> <tr> <td id="**SelectCheckBox**" class="helpBod"> <input id="TimeSheetWebUserControl1_TimeSheetRepeater_ctl01_CheckBox0" type="checkbox" name="TimeSheetWebUserControl1$TimeSheetRepeater$ctl01$CheckBox0"/> </td> <td> </td> </tr> <tr> <td id...

iWork Comment Ability, Is this possible to implement using JQUERY

iWork has the ability to highlight text and then tag a comment to that text. The comment then is linked with a line to the highlighted text. I'm curious if something like this could be implemented in JQUERY. What has me puzzled is: A. How to draw a line and have it update when a user changes the text B. How to highlight text and have ...

Include Jquery inside GreaseMonkey script under Google Chrome

As maybe some of you know google chrome has put some severe limitation on greasemonkey scripts. Chromium does not support @require, @resource, unsafeWindow, GM_registerMenuCommand, GM_setValue, or GM_getValue. And without require, I can't find a way to include jquery library in Greasemonkey script under google chrome. Does anybod...

jQuery alert plugin that produces alerts like Twitter/StackOverflow?

A while ago I came across a jQuery plugin that produced the alert/message boxes like those seen on Twitter (when saving settings) and StackOverflow. Can somebody point me to them online? I'm having trouble getting relevant search results... Thanks ...

replacing all instances on a page - javascript

Hi I would like to replace all href and action attributes on a page with href="#" and action="#". Could someone point out where i am going wrong; $(document).ready(function(){ var contents = $("body").html(); contents.replace( /href=[\"'][^'\"]*[\"']/g, 'href="#"' ); contents.replace( /action=[\"'][^'\"]*[\"']/g, 'action="#"' ); }); ...