Basic Navigation Script - setNav


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. setNav = function(){
  2. var _html = "";
  3. _html += "<ul id='nav'>";
  4. _html += " <li class='Home'><a href='/' title=''>Home</a></li>";
  5. _html += " <li class='About'><a href='/' title=''>About</a></li>";
  6. _html += " <li class='News'><a href='/' title=''>News</a></li>";
  7. _html += " <li class='Contact'><a href='/' title=''>Contact</a></li>";
  8. _html += "</ul>";
  9. document.write(_html);
  10. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.