[jQuery] Re: get top most parent

2008-11-24 Thread Liam Potter
header2obj.children().children().children(#submenu); chitgoks wrote: hi, i am stumped so i am posting it here. no luck searching google for many hours this is my html code div id=firstpane class=menu_list !--Code for menu starts here-- p id=header1 class=menu_headHeader-1/p

[jQuery] Re: get top most parent

2008-11-24 Thread Shawn Grover
$(#header2).children(p.submenu); or $(#header2).find(.submenu); or make use of context: $(.submenu, #header2); - read that as all items with class of .submenu under the #header2 object. The #header2 part can be a selector, DOM element, or jQuery object. HTH Shawn Liam Potter wrote:

[jQuery] Re: get top most parent

2008-11-24 Thread chitgoks
i managed to get the top most parent regardless which menu item is clicked using this code $('#ID_HERE').parents('div.menu_body').prev($('#ID_HERE').parents ('div.menu_body').size()-1)