Wednesday, 25 May 2016

How to load or include a html file in JQuery

Use the below lines of code in js file to load the html page into the div

$(document).ready(function() {
    $('#loadSearchPage').load('html/search.html');
});

use the below code in search.html,

<div id="loadSearchPage"></div>

No comments:

Post a Comment