210 Responses

← Previous Page 5 of 5
  1. Prashant
    Prashant April 28, 2014 at 12:35 pm |

    how to change the state of elements to collapsed state if i click on parent element.
    for e.g in demo if i click on “Item A” then expand all the sub items(i.e Item A.1 & Item A.3) in “Item A” n then if i click on Item A then all the sub elements should go into collapsed state.


  2. Prashant
    Prashant April 29, 2014 at 9:06 am |

    How to change state of children elements to collapsed when we click on a parent.
    for e.g in demo if i expand Item A then later expand Item A.1 & Item A.3. now when i click on Item A,Item A.1 & Item A.3 should go to collapsed state & should be hidden.
    how to achieve this??


  3. bk
    bk May 19, 2014 at 3:00 pm |

    Hi, I am trying to implement your expandable list. May I know where I should add the Javascript? Thank you.


  4. bk
    bk May 20, 2014 at 1:46 am |

    I wanted to use this in the blog page. What I did was to copy the code for the list into the page. I put the CSS portion in the Style of the theme. For the Javascript code, where should I place it for the list to work. I trying putting it after the wp_head in header.php file but it didn’t work. How may I make it work? Please advise. Thank you.


  5. bob
    bob July 1, 2014 at 3:12 pm |

    If i could I would kiss you on the lips. This is awesome. Thanks so much. Saved me about 40 hours worth of work.


  6. Bradley
    Bradley July 14, 2014 at 6:47 pm |

    Can you provide the example without using Jquery?


  7. angry_tapdancer
    angry_tapdancer July 20, 2014 at 7:34 am |

    This seemed like an attractive solution except for two things which took me hours to figure out, and may be handy for other users to know:
    * won’t work for lists that are dynamically created, since your function is only called on document ready
    * because you rely on an ID to modify the element, it’s not an easily scalable solution for many separate lists
    …a third thing that drove me nuts is that I can’t change the tabulation of the list, but I suspect this is a broader style problem that I just don’t know how to deal with.


  8. Visentije
    Visentije September 11, 2014 at 6:30 am |

    Hi!
    Adding links inside the elements: hyperlink that points to the bookmark on same page.

    If I add hyperlink (inside the elements) that points to the bookmark on same page, like:

    Top of Page

    than, that hyperlink always opened in NEW tab (correct location of page), instead in same tab another location? I want to that kind of hyperlink open in _self page. Any chance to do that in your code?

    “Target” attribute values (“_blank|_self|_parent|_top|) do not change anything, the hyperlink continue to open always in another, new tab, although it should point on bookmark in SAME page!


Leave a Reply