How to add <li> using javascript?

Posted by metal-gear-solid on Stack Overflow See other posts from Stack Overflow or by metal-gear-solid
Published on 2010-05-27T05:16:01Z Indexed on 2010/05/27 5:21 UTC
Read the original article Hit count: 333

Filed under:
|
|

I want to add one more li at last but using JavaScript/jQuery

for example i want to add this li at last <li><a href="#header" >Back to top</a></li>

<ul id="nav">
    <li><a href="#nowhere" >Lorem</a></li>
    <li><a href="#nowhere" >Aliquam</a></li>
    <li><a href="#nowhere" >Morbi</a></li>
    <li><a href="#nowhere" >Praesent</a></li>
    <li><a href="#nowhere" >Pellentesque</a></li>
        Here i want to add one more li using javascript
</ul>

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery