[jQuery] Re: Selecting each instance separately

2010-01-16 Thread Phong Long
when u do '.gallery li', that selector returns an array with every li that matches. the :gt(2) refines it to every li within that result set greater than 2. what u need is to keep each .gallery ul separate. try this: $('.gallery').each( function(){ $(this).children('li').hide(); } ); u haven't

[jQuery] Re: wild card selectors question

2009-12-28 Thread Phong Long
your way is definitely more elegant and will work regardless of what they decided to make the id's. On Dec 28, 10:48 am, MorningZ wrote: > If it was me, I'm not sure i would hide the row from the user, because > as an example, what happens if I accidentally select the "9" choice? > by hiding the

[jQuery] Re: wild card selectors question

2009-12-28 Thread Phong Long
when you do $('input[id$=9]').is(":checked"), an array of all matched elements is returned. So you can do this: var checkedNAItems = $('input[id$=9]').is(":checked"); and that should should get you an array of all elements. from there, you can loop through them and extract the info you need

[jQuery] how does pixmac.com do their neat drawer effect that shortens scrollbar when their "favorites" tab is activated?

2009-11-29 Thread Phong Long
I've come across a neat bit of, what seems to me, site/jquery/css trickery by the site pixmac.com where their favorites tab (on the bottom right of the page) will pop up when clicked, and the scroll bar is shortened, and the width of the tab when it pops up is 100% the width of the window. the scr