Thursday 11 April 2019

Creating master or common menu in html only website

Html does not have master page like feature, so you might end up creating menu on each page.
But with help of javascript you can  do a work arround

Paste your menu code in seperate file and do next after the DOM load

$(document).ready(function () {
    //adds Main-manu.html content into any "#MainMenu" element
    $('#MainMenu').load('Main-manu.html'); 
});

No comments:

Post a Comment

Send All Azure App Insights Or Logs Data To Tool Like Datadog

  Introduction Microsoft Azure provides a variety of insights and monitoring logs that you can monitor to check the state of a resource and ...