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 inul
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
Post a Comment