Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [jquery] Trying to create a dynamic TOC nested list

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #23255
    Michael
    Member

    Hey fellow css and jquery fans,

    (i hope it’s okay to post this here as i saw other jquery threads around. Maybe there should be seperate jquery forum?)

    anyway:
    i am trying to pull all headings out of a page and create a unordered
    list in the sidebar, which should then act as navigation help.

    Code:
    $(document).ready(function() {
    $(‘#sidebar #references’).after(“

    I am able to append the anchors, but i can’t create
    the list. I was looking at the wrap-function of jquery, but didn’t
    figure out how to use it in this scenario. Also, i am actually "pulling out" the anchors of the main page so they are "cut & pasted" in the sidebar. Of course, i only want to copy their values..

    Can somebody explain me how to get the copy-value of this.firstChild
    sorrounded by "<li></li>"?

    aah and here is my html markup:
    Main-content:
    ==========

    Sidebar:
    =======

    Thanks in advance,
    Michael

Viewing 1 post (of 1 total)
  • The forum ‘CSS’ is closed to new topics and replies.