jquery - jQeuer / AJAX - load whole external file into the 'ul' element -



jquery - jQeuer / AJAX - load whole external file into the 'ul' element -

i working on project have massive multilevel menu - create in easier update in future (site static html) decide stack menu in separate file.

my question is:

how load whole content external file in ul element using jquery?

e.g html be:

<ul class="menu"> </ul>

external file menu.html like:

<li><a href="index.html">home</a></li> <li><a href="index.html">home</a></li> <li><a href="index.html">home</a></li> <li><a href="index.html">home</a></li> <li><a href="index.html">home</a></li>

any help appreciated.

$(".menu").load("menu.html");

take jquery's .load() documentation.

jquery

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -