[jQuery] Re: Check if contents of lis is an image

2008-10-13 Thread Mauricio (Maujor) Samy Silva
Try: $(document).ready(function(){ if ($('#medalist li.active').children().is('img')){ alert("true"); }else{ alert("false"); } }); There are typos errors in your sintaxe. Double check it! -Mensagem Original- De: "jdenkaat" <[EMAIL PROTECTED]> Para: "jQuery (English)" Enviada e

[jQuery] Re: Check if contents of lis is an image

2008-10-13 Thread MorningZ
this should work: if ($("#medalist > ul > li:active img").length() > 0) { // has image inside } On Oct 13, 3:52 am, jdenkaat <[EMAIL PROTECTED]> wrote: > Hi > > If I have the following list and I want to find if the contents of class="active"> is an image how would I do it? > > >