[jQuery] Re: Newbie question- declarative selectors inside procedural code

2009-05-26 Thread Jason Persampieri
, 8:29 pm, kiusau kiu...@mac.com wrote: On May 25, 3:44 am, Jason Persampieri papp...@gmail.com wrote: Certainly... you're really not all that far off at all... let me just point out a couple of things. Very nice presentation! It is likely that many novice users of jQuery will be able

[jQuery] Re: jQuery functions called from setTimeout fails

2009-05-25 Thread Jason Persampieri
Alternatively, another method would be - setTimeout( function() { movebus(a, b, c);}, 300); This format is preferred as it won't invoke 'eval', allows for more complex logic and gets you some nifty closure action. _jason On May 25, 1:36 am, Surya Prakash suryabg2...@gmail.com wrote: Hi U

[jQuery] Re: Newbie question- declarative selectors inside procedural code

2009-05-25 Thread Jason Persampieri
Certainly... you're really not all that far off at all... let me just point out a couple of things. 1) It's :first-child, not :first. 2) inside the loop, the variable - this - is a reference to the DOM li node. Hence, to get the jQuery object for that node, use $(this) (note the lack of

[jQuery] Re: jQuery(document).ready() Type error on WebKit based Browsers

2009-05-25 Thread Jason Persampieri
Sure, I wasn't doing anything fancy, just - try { if ( div.getElementsByClassName(e).length === 0 ) return; } catch (e) {} but I'm not sure how that would have affected Opera and such (it really shouldn't). As John said (on the jquery dev mailing list), the problem is due to running

[jQuery] Re: Newbie question- declarative selectors inside procedural code

2009-05-25 Thread Jason Persampieri
have an IE quivalent to Firebug so i'm slightly stuck on how to try to debug it. Anyway, in Firefox it works like a charm. Thanks for the help, much appreciated! Regards: colin_e On May 25, 11:44 am, Jason Persampieri papp...@gmail.com wrote: Certainly... you're really not all that far

[jQuery] Re: animate padding start value - Firefox (getComputedStyle)

2009-05-22 Thread Jason Persampieri
Safari jumped as if I'd simply set the value. Maybe that's related to what you're seeing, but it works on some level without giving an error Liam Jason Persampieri wrote: The problem occurs when trying to determine the 'start' value. getComputedStyle explodes 'padding' into its four

[jQuery] Re: animate padding start value - Firefox (getComputedStyle)

2009-05-21 Thread Jason Persampieri
a smooth animation - the others (FF, Chrome Safari) seem to jump L Jason Persampieri wrote: (Firefox 3.0.10, OS X) I am setting a padding value via a stylesheet and trying to animate it - - CSS myElement { padding: 20px } - Javascript myElement.animate( {padding: 12px

[jQuery] attribute selector order

2009-05-21 Thread Jason Persampieri
(Firefox 3.0.10, OS X) Can anyone explain why these two statements would return different sets? inlineTips.filter([title!=''][value='']) [input.inlinetip, input.inlinetip, input.inlinetip, input.inlinetip, input.inlinetip] inlineTips.filter([value=''][title!='']) [] To make sure it's not

[jQuery] Re: submit() not submitting

2009-05-21 Thread Jason Persampieri
That will only submit if form is the first-child of it's parent (in the DOM). Can you verify that's the case? alert( $(form:first).length ); // or something On May 21, 12:51 pm, l3kris jcj...@gmail.com wrote: I have this function that validates and is supposed to submit a simple form:

[jQuery] Re: how to get the element that triggered the event

2009-05-21 Thread Jason Persampieri
Instead of declaring the javascript handler in the href, declare it with jQuery in a script section. a class='print' href='#'Print/a script type='text/javascript' $(a.print).click(function() { printSection( $(this).parent() ); return false; }) /script _jason On May 21, 7:18 pm, iceangel89

[jQuery] animate padding start value - Firefox (getComputedStyle)

2009-05-20 Thread Jason Persampieri
(Firefox 3.0.10, OS X) I am setting a padding value via a stylesheet and trying to animate it - - CSS myElement { padding: 20px } - Javascript myElement.animate( {padding: 12px} ) When calculating the start padding value, jQuery calls 'getComputedStyle'. Unfortunately, computedStyle.padding

[jQuery] Re: How to display additional text along with link

2009-05-15 Thread Jason Persampieri
Is this what you're looking for? $(a:not[href^=http]).each(function(){ var ext=$(this).attr(href).match(/\.[^\.]*$/); if (ext) $(this).after(span class='fileExtension'(+ext.slice (1)+)/span); } ); On May 15, 8:09 am, infoaddicted jack.lapla...@gmail.com wrote: This calls for a