javascript - can't dynamically create my navigation bar -


i have following javacript code, it's purpose dynamically generate navigation bar upon window being loaded. have ensured function being called upon page load, navigation bar not appear. not getting errors either. ideas on how make work?

$(document).ready(function() {       var navigation =          '<nav class = "navigation">' +          '<ul>' +          '<li><a href="home.html">home</a></li>' +          '<li><a href="about.html">about</a></li>' +          '<li><a href="menu.html">menu</a></li>' +          '<li><a href="image_gallery.html">image gallery</a></li>' +          '<li><a href="contact.html">contact us</a></li>' +          '</ul>' +          '</nav>';   }); 


Comments

Popular posts from this blog

sql - Time in datatime field -

javascript - How to split the success output from an Ajax post? -

java - sharing object across different classes -