[jQuery] Re: get all children and subchildren
hector, hi. thanks for that, yes, you are right with the find() function.
[jQuery] get top most parent
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 div class=menu_body a href=#Link-1/a a href=#Link-2/a a href=#Link-3/a /div p id=header2 class=menu_headHeader-2/p div id=header2_menubody class=menu_body div id=pane class=menu_list p id=submenu class=menu_headSub-Menu/p div class=menu_body a href=#Sub Link-1/a a href=#Sub Link-2/a a href=#Sub Link-3/a /div /div a href=#Link-1/a a href=#Link-2/a a href=#Link-3/a /div p id=header3 class=menu_headHeader-3/p div class=menu_body a href=#Link-1/a a href=#Link-2/a a href=#Link-3/a /div /div !--Code for menu ends here-- if i have access to the object id header2 how can i get access to id=submenu ? i tried header2obj.children('.menu_head') but it doesnt work. thanks
[jQuery] Re: How to find the first parent?
elementobj.parents()[0] or elementobj.parent() On Mon, Nov 24, 2008 at 6:51 PM, Debby [EMAIL PROTECTED] wrote: How to find very first parent of perticular element? -- Website/Java Games: http://www.chitgoks.com Java Casino Games: http://chitgoks.tripod.com Photo Gallery: http://gallery.chitgoks.com My Blogs: http://tech.chitgoks.com http://wuhtevah.chitgoks.com http://disneyusa.blogspot.com
[jQuery] get all children and subchildren
how would you write the code to get all children and sub-children that are of class menu_head and menu_body? example this would be my html p id=header2 class=menu_headHeader-2/p div id=header2_menubody class=menu_body div id=pane class=menu_list p id=submenu class=menu_headSub-Menu/p div id=submenu_menubody class=menu_body a id=submenu_sublink1 href=#Sub Link-1/a a id=submenu_sublink2 href=#Sub Link-2/a a id=submenu_sublink3 href=#Sub Link-3/a /div /div a id=header2_link1 href=#Link-1/a a id=header2_link2 href=#Link-2/a a id=header2_link3 href=#Link-3/a /div this was what i tried $('#header2').children('.menu_head') and $('header2').children ('.menu_body') but they dont work if i use $('$header2').children() it will only give me the div with id pane anyone got ideas? thanks
[jQuery] Re: get top most parent
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)
[jQuery] Re: get all children and subchildren
by the way, the sample html above is only 1 sub level. i am going to place in a lot of sub-sub menus so my issue is how to traverse to all children way down the tree that have the p tag and class menu_head