How about this?

function initDashboard() {
    $(document).ready(function() {
       if($(".adminMsgSummary").length) {
          $(".adminMsgSummary dl:not(first)").hide("fast");
       }
    }
}

Code not tested, but should work.

Carl

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??????
>
>
>   

Reply via email to