Reputation: 1
I have created a footer for my website and have at most 50 pages in it. Consider my code
<div id="footer">
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About Us</a></li>
<li><a href="feedback.html">Feedback</a></li>
</ul>
</div>
Now If I am asked to add "contact us" option in the footer content, I need to go to all pages and have to add the "contact us" option. It is kind of irritating and time consuming. There must be option to change the footer content from single page. Please help me in this issue. If there is any jquery code to achieve this it would be more grateful to me.
Upvotes: 0
Views: 109
Reputation: 6982
you can use .append()
in jquery. as:
$("#footer ul").append('<li><a href="contact.html">Contact</a></li>');
Upvotes: 0
Reputation: 121998
Go for Include file
<div id="footer">
<!--#include virtual="footer.html" --> //your menu in this file
</div>
And have a look at Server side Includes before start coding.
Upvotes: 1