[jQuery] Re: Finding a parent list item.

2007-05-26 Thread Daemach
Not that I can see, unfortunately. The problem isn't with jQuery - apparently FF just handles file input elements differently (*nudge Mr. Resig*) I couldn't even catch capturing/bubbling events :/ Were you able to get firebug working? Regardless of how this bit of programming turns out, if yo

[jQuery] Re: Finding a parent list item.

2007-05-26 Thread [EMAIL PROTECTED]
Thanks for getting back to me. You're right - FireFox is triggering the focus event when focusing on the browse button (although not the label). Any solution to this? I've tried modifying the code to: $(function() { $("ul.form li") .focus ( function() { $(th

[jQuery] Re: Finding a parent list item.

2007-05-26 Thread Daemach
In the interest of teaching a man to fish: 1. Install firebug from www.getfirebug.com 2. Turn it on by right clicking the small grey icon in the lower right corner - status bar. 3. Download this and include it in your scripts: http://jqueryjs.googlecode.com/svn/trunk/plugins/debug/ 4. Switch to t

[jQuery] Re: Finding a parent list item.

2007-05-25 Thread fambizzari
Unfortunately, whilst i still don't understand how to use firefbug, i can say for sure that none of the 3 ideas (i.e. input, [EMAIL PROTECTED] or .pickme) work when it comes to the type="file" input. As mentioned before, when i remove type="file" from the input, then the code works fine and the p

[jQuery] Re: Finding a parent list item.

2007-05-25 Thread Daemach
Hmm - input should get it by itself I would think. Are you certain it's not picking up the file field? Use firebug and console.log($ ('input')); The fastest solution may be to add a class to all of the elements you want to select and use that instead. ('input.pickme'). When I get back in I'll

[jQuery] Re: Finding a parent list item.

2007-05-25 Thread fambizzari
I've tried - $("ul.form").find("input,select,textarea,option,[EMAIL PROTECTED]") and - $("ul.form").find(":input") And neither of those work!!! I've removed file="type" from the input just to make sure that is the problem and everything works fine if its gone. Any more ideas? On May 25, 7:14

[jQuery] Re: Finding a parent list item.

2007-05-25 Thread Daemach
Try $("fieldset").find(":input") to grab all form fields. (http:// docs.jquery.com/DOM/Traversing/Selectors) If that doesn't work, [EMAIL PROTECTED] should pick it up. On May 25, 9:08 am, fambizzari <[EMAIL PROTECTED]> wrote: > Unfortunately, whilst your suggestions work excellently, the follow

[jQuery] Re: Finding a parent list item.

2007-05-25 Thread fambizzari
Unfortunately, whilst your suggestions work excellently, the following piece of code: $("fieldset").find("input,select,textarea,option") does not work with Any idea what i should do to fix it? On May 25, 3:50 pm, fambizzari <[EMAIL PROTECTED]> wrote: > Thanks Guys. > > Most helpful > > On M

[jQuery] Re: Finding a parent list item.

2007-05-25 Thread fambizzari
Thanks Guys. Most helpful On May 25, 11:32 am, George Adamson <[EMAIL PROTECTED]> wrote: > Daemach2's solustion would do it, and if your elements are nested > inside other elements, you may wish to restrict the parents() method to > match only the first up the tree by using > $(this).parents(

[jQuery] Re: Finding a parent list item.

2007-05-25 Thread George Adamson
Daemach2's solustion would do it, and if your elements are nested inside other elements, you may wish to restrict the parents() method to match only the first up the tree by using $(this).parents('li:first').addClass('on'); instead, that way you won't set addClass('on') for more than one Ge

[jQuery] Re: Finding a parent list item.

2007-05-25 Thread Daemach
You should be able to do: $(function() { $("fieldset").find("input,select,textarea,option").focus (function() { $(this).parents('li').addClass('on'); } ) .blur (function() {

[jQuery] Re: Finding a parent list item.

2007-05-25 Thread Jean Nascimento
i think is that $(function() { $("fieldset").find("input,select,textarea,option").focus (function() { this.parent().addClass("on"); } ) .blur (function() { this.parent().removeClass();