changing content on click


i have nav bar on side, , when user clicks on link, nav content changes.  here code:

 

$('#allnav').click(function() {

        $("#alltitle").html("my files");

        $("#alltitle").load("http://mysite.com/getfiles.php");

        $("#navpane").html("<li><div id='allnav'><strong><a href='#'>~all</a></strong></div></li><li><div id='photonav'><a href='#'>~photo gallery</a></div></li><li><div id='docsnav'><a href='#'>~my documents</a></div></li></ul> ");

    });

    $('#photonav').click(function() {

        $("#alltitle").html("photo gallery");

        $("#navpane").html("<li><div id='allnav'><a href='#'>~all</a></div></li><li><div id='photonav'><strong><a href='#'>~photo gallery</a></strong></div></li><li><div id='docsnav'><a href='#'>~my documents</a></div></li></ul> ");

    });

   

    $('#docsnav').click(function() {

        $("#alltitle").html("my documents");

        $("#navpane").html("<li><div id='allnav'><a href='#'>~all</a></div></li><li><div id='photonav'><a href='#'>~photo gallery</a></div></li><li><div id='docsnav'><strong><a href='#'>~my documents</a></strong></div></li></ul> ");

    });

 

<li><div id="allnav"><strong><a href="#">~all</a></strong></div></li>

<li><div id="photonav"><a href="#">~photo gallery</a></div></li>

<li><div id="docsnav"><a href="#">~my documents</a></div></li>

</div>

 

when click on 1 link, works fine.  after that, no longer works when click on link in nav menu. 

the code you've pasted extremely incomplete. chance can see live page?



More discussions in Dreamweaver support forum


adobe

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support