Thanks everyone - it did the trick all right! I had tried to use the :not selector previously but didin't have the syntax right, something I need to try brush up on & could maybe be a little clearer in documentation especially seeing as many designers (like myself) who use JQuery wouldn't have the most flexible programming brains :)
Thanks again & happy coding! On Apr 24, 11:07 pm, Karl Swedberg <[EMAIL PROTECTED]> wrote: > this should do it: > > $(document).ready(function() { > $('div.adminMsgSummary dl:not(:first)').hide(); > > }); > > :-) > > --Karl > _________________ > Karl Swedbergwww.englishrules.comwww.learningjquery.com > > On Apr 24, 2008, at 10:53 AM, cloudsteph wrote: > > > > > I think I may have been looking at this a little too long or something > > to cause it not to work coz it seems like it should be pretty simple > > to do, but it no work for me :( What I want to do is loop through all > > the <dl> elements within a certain div and hide all of them except for > > the first one. Here's my broken code: > > > function initDashboard(){ > > $(document).ready(function(){ > > if($(".adminMsgSummary").length > 0){ > > var theCount = $(".adminMsgSummary dl").length-1; > > for(z=1;z<=theCount;z++){ > > var theDl = $(".adminMsgSummary dl"); > > theDl[z].hide("fast"); > > } > > } > > }); > > } > > > Any ideas??????