[jQuery] Re: Help with Column Navigation plugin (list page by selecting a element with particular ID)
Hi, Is there any reply/idea for this email please. Awaiting for reply. Thanks. On Fri, Jan 22, 2010 at 12:50 PM, Asharudeen asharud...@gmail.com wrote: Hi, By using CloumnNavigation plugin ( http://plugins.jquery.com/project/column-navigation), Currently to list the tree list, we need to give the html in the following format, http://plugins.jquery.com/node/ html body ul id=myTree li a href=./Homepage/a ul lia href=./contactContact/a/li lia href=./tsandcsTerms amp; Conditions/a/li lia href=./privacyPrivacy information/a/li /ul /li li a href=./contentsContents/a ul lia href=./page1/Page 1/a/li lia href=./page2/Page 2/a ul lia href=./page2.1/Page 2.1/a/li lia href=./page2.2/Page 2.2/a/li /ul /li lia href=./page3/Page 3/a/li /ul /li /ul /body /html Initially this code will list the 'Home' and 'Contents'. If we click on the particular element it will list the sub elements. Assume, if the li element and anchor element have unique IDs. Is there a way list by using their IDs. Or is there way to list the childs of the particular element. That is if the anchor id for 'Contact' is 'ancID1' and li id is 'idofLi1' then is there a way to list the page as the 'Contact' is selected.. such that the sub elements of 'Contacts' also will be list in page. Is there any way to do it. Thanks in Advance.
Re: [jQuery] Re: Help with Column Navigation plugin (list page by selecting a element with particular ID)
On Fri, Jan 22, 2010 at 12:50 PM, Asharudeen asharud...@gmail.com wrote: Assume, if the li element and anchor element have unique IDs. Is there a way list by using their IDs. Or is there way to list the childs of the particular element. I'm not exactly sure what you're asking but, yes, you could find all children of the clicked menu item: $(#myTree a).click(function() { var immediateChildren = $(this).next().children(li); var allDescendants = $(this).next().find(li); }); Those will find the li elements but you can modify it to get the a elements or the href values or the a text or whatever. Hope that helps - like I said, I'm not sure what you're after, exactly. Nathan
Re: [jQuery] Re: Help with Column Navigation plugin (list page by selecting a element with particular ID)
Hi, Thanks for your reply. Please go this URL: http://code.google.com/p/jquery-column-navigation/ In this a sample html example will be present. If we use the jquery column navigation plugin, while reload the page by default 'HomePage' and 'Contents' will be listed in the page. If we click on the 'HomePage' the sub elements will be listed. What I need is, while reloading the page, I want to list the sub elements of HomePage/Contacts in the tree by default. (Just assume, I have the unique ID for each li and anchor link.) ie, HomePage/Contents will be in selected state, and the sub elements will be listed by default. I will try your previous reply and update you. Meanwhile, I hope the above requirement is clear. Please let me know, if you need any further details regarding this. Once again thanks for your reply. On Thu, Jan 28, 2010 at 10:26 PM, Nathan Klatt n8kl...@gmail.com wrote: On Fri, Jan 22, 2010 at 12:50 PM, Asharudeen asharud...@gmail.com wrote: Assume, if the li element and anchor element have unique IDs. Is there a way list by using their IDs. Or is there way to list the childs of the particular element. I'm not exactly sure what you're asking but, yes, you could find all children of the clicked menu item: $(#myTree a).click(function() { var immediateChildren = $(this).next().children(li); var allDescendants = $(this).next().find(li); }); Those will find the li elements but you can modify it to get the a elements or the href values or the a text or whatever. Hope that helps - like I said, I'm not sure what you're after, exactly. Nathan