Issue
I have some html pages with the same footer. With JavaScript and only JavaScript could I import another html page inside it?
Solution
As above, one method is to use jQuery load. I happened to be doing the exact same thing now, so will post a quick example.
Using jQuery:
$("#yourDiv").load('readHtmlFromHere.html #readMe');
And your readHtmlFromHere.html page would consist of:
<div><div id="readMe"><p>I'm some text</p></div></div>
Answered By - Ricky
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.