what's the size() supposed to do? get you the number of sumenu items or something?
at least you got that part right because jquery objects arent returned as true or false, but you have to check if the object's length is greater than 0. if ($('#pagemenu li').length > 0) { alert ('looks like a submenu to me'); } On Mar 25, 1:18 pm, Will Skelton <[EMAIL PROTECTED]> wrote: > Hey group, > I've been battling with this all day. any help would be appreciated. > I'm quite new a jQuery so it could be something obvious and simple. > > also, feel free to give me any advice related to the rest of my code > if you feel compelled. > > what i'm doing is, loading via $.ajax, pages on my server and > populating my main div "contentcenter" with the returned html. > > without pasting a bunch of confusing code on here.. I think the > problem boils down to this. > > if the returned page is to have a submenu then the returned html > contains: > <div id='pagemenu'> > <ul> > <li class='menuitem'>submenuitem1</li> > <li class='menuitem'>submenuitem2</li> > ... > </ul> > </div> > > after I run > $("#contentcenter").html(html) **html being the html returned > from the requested page to the ajax call > and set the innerHTML to the returned html string > > when i then use: > $("#pagemenu").find('li').size(); > > to try and find out if the page has a submenu.. > FF returns correctly (read: what I expect) and IE7 does not. > > any ideas? > I've burned up the better part of the day trying to figure this out. > > thanks > Will