jquery-1.3

jQuery 1.3 only selecting the first element

I'm not sure if this is a bug or just some crazy new thing in jQuery 1.3 that I'm unaware of, or if I've just gone crazy. I have a table with 11 checkboxes in it, and I can't select them all using jQuery 1.3: // jQuery 1.2.6 $(".myTable").find(":checkbox"); // finds 11 elements // jQuery 1.3 $(".myTable").find(":checkbox"); // finds...

JQuery is waiting for images to load before executing document.ready

Update: This bug has been confirmed by at least two others. Even if you dont read my full post - if you're reading this and using JQuery 1.3.1 then stop using it if you're relying on any handlers that you want to execute when the DOM is complete but before the page's images have loaded. Update2: Thanks to Tom (user id 20!) for posting ...

More efficent method of styling alternating blocks of table rows with jQuery?

Doing odd/even styling with jQuery is pretty easy: $(function() { $(".oddeven tbody tr:odd").addClass("odd"); $(".oddeven tbody tr:even").addClass("even"); }); Now I came across an interesitng problem today. What if you want to style alternating groups of elements? For example, alternating blocks of 3. Longhand this can be done...

Finding all classes that match a pattern in an HTML document?

I got to thinking today: what is the best way of getting a distinct (ie no repeats) list of classes used in a document that (preferably) match a pattern (regular expression) pattern or (alternatively) start with a certain character sequence? JQuery can be used for this or just straight Javascript. Now it should obviously cater for all ...

jQuery dialog that darkens the screen like the link dialog does here

I like the look of the link dialog here. It darkens the screen and is probably modal (although I haven't tested that I just assume it is). What's a quick and easy way of darkening the screen like that witha jQuery UI Dialog? ...

JQuery event.target error

Hi, I've a box from divs (price_item) with several child divs (date, price etc.). I'm using it as a caroussel for showing prices. If one clicks on any child, the parent's background color must be changed to red. I wrote it like: $(...selectquery...).click(function() { var $tgt = $(event.target); $tgt.parent().css("backgroundColo...

Change height in jquery only working once

I've got a set of product listings that each have a link below them with a click event on it, when this is clicked it goes to the parent class, finds the class "surf_prod1" below and slideToggles it. Where a function that checks through all divs with a class of "surf_prod" and gets the biggest innerHeight which is passed back and used a...

Selecting all empty text fields in Jquery

How can I find all text fields that have an empty value? $(":text[value='']") gives a JavaScript error I know I can do $(":text"), iterate through and return all fields with $(this).val()=='' I am looking for a cleaner method and using JQuery 1.3.1 It has to work if the element originally had a value when the page was loaded, and th...

strange behavior when using jQuery fadeOut function on element with floated element and absolutely positioned element

I am trying to use jQuery to fade out a div, using the fadeOut function. In most cases, it seems to work fine, but in certain cases, not all of the content fades out. If I have an absolutely positioned element and a floated element within the div, the fadeOut function doesn't work. If I only have an absolutely positioned element, it does...

jQuery event handlers not firing in IE

I have a list of items on a page with a set of controls to MoveUp, MoveDown and Delete. The controls sit at the top of list hidden by default. As you mouseover an item row, I select the controls with jquery //doc ready function: .. var tools = $('#tools'); $('#moveup').click(MoveUp); $('#movedn').click(MoveDn); $('#delete').click(Dele...

Round speedometer with Jquery / CSS in a browser

I need to make a round object much like a speedometer (with moving needle inside indicating a value) in a browser. currently for all other items on this page iam using jquery. I rather not use flash as it needs to be ipod / iphone usable. Any experience others have had doing this is greatly appreciated. ...

Is there an automatic jQuery plugin updater?

Is there some sort of utility available that will check my jQuery plugins and see if they are the latest version? I understand that there is not an easy way to check the version numbers automatically; but I wonder if anyone has taken a look at this. ...

jQuery focus function not working in Firefox

The following piece of code focuses the text input after you click on the link. It works fine for Chrome 2.x, IE8 and Opera 9.64 but not on Firefox 3.0.9. The text input flashes quickly in Firefox then disappears, I'm currently working on Windows XP SP2. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1...

jquery child matching too much?

I am importing a feed into Tumblr and because of the formatting of the site, it shows too many pictures. So to fix that, I thought I would use jquery to remove extra elements. It turns out that the imported feed uses tables. No worries, I made a jquery call that seemed to work fine on an individual post. (Pardon the ugly match) $('....

How do you select more than one element by id?

Hi, I have two identical click events for two different elements that do not share a class, as such: $("#element_1").click(function(){ alert("hello world"); }); $("#element_2").click(function(){ alert("hello world"); }); I am looking for a way to assign that same click function to both of them without externalizing the function ...

Making jQuery statements shorter

I have the following jQuery statement which works fine but I was wondering if it could be shortened and if making it more concise would speed up performance or not? The reason for the strange starting tag is that it is for a wordpress theme. Cheers in advance! jQuery(document).ready(function($) { $(".sidebar ol#navigation li.work a")...

How can I assign a property to a jQuery object?

Hi, It is in my understanding that referencing any DOM element in jQuery via the dollar sign (like this: $("#mydiv")), returns an object. I am looking to add an additional property to an object as such: $("#mydiv").myprop = "some value"; but this does not seem to work. I am trying to store a value in this object so I can reference it...

parse variable as JSON w/ jQuery

I am trying to populate a form with a list of questions and radio buttons. When the page is loaded I have a variable that contains the answers they have so far as a string in JSON format: var json = '{ "answers" : [{"84" : "Y" },{"85" : "Y" },{"86" : "Y" },{"87" : "Y" },{"88" : "Y" },{"89" : "N" },{"90" : "N" },{"91" : "N" },{"92" : "Y...

jQuery with ASP.NET WebForms - disabling textboxes

Another jQuery noob question - what am I doing wrong?? I have some HTML markup rendered by ASP.NET 3.5 webforms which looks like this: <input id="ctl01_cphContent_pnlBasicInfo_chkRC" type="checkbox" name="ctl01$cphContent$pnlBasicInfo$chkRC" /> <label for="ctl01_cphContent_cntPromos_pnlBasicInfo_chkRC">Recurrent Charges</label>...

Problem with removing/animating a YouTube flash video-player container.

I used the code from the following question to insert a YouTube video into a page: http://stackoverflow.com/questions/1314662/how-to-resize-a-youtube-player-from-thumbnail-size-to-normal-size. Given the following html: <dl> <dt>Thoughts of Sacrament</dt> <dd><div class="placeholder"><img src="img/H5ZEYFgmfYo.png" id="H5ZEYFgmfYo" /></d...