Hi Pascal - I did a little bit of re-tooling and got it working: http://john.jquery.com/jquery/test/page.html
Let me know if it helps. --John > $('.page').each(function(i) { > var title = $('h3',this).eq(0).text(); > var link = $('<li><a href="#page'+(i+1)+'">'+title+'</a></li>'); > $('.sidenav ul').append(link); > $('a',link).click(function() { > alert(1); > // $('.page',pages).hide(); > // $(page).show(); > }); > }); > $('.page').hide().eq(0).show(); > > > it grabs the text of the first H3 in each section to use as the link > text. it builds an LI element containing the link, then appends that > to the sidenav. then it tries to assign a click handler to the link. > > i've commented out the functional part of the click function and just > put in an alert for testing, but the function isn't firing when i > click these links. am i missing something? _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/