The question is as follows, I have only .HTML static files and am looking for a simple way to create the blocks only once using only the client side .
The idea is to respect DRY, is there any way to do this directly with JavaScript or jQuery?
The question is as follows, I have only .HTML static files and am looking for a simple way to create the blocks only once using only the client side .
The idea is to respect DRY, is there any way to do this directly with JavaScript or jQuery?
Yes, it is possible.
load()
jQuery Example: load header.html content into the div with id header
.
$("#header").load("public/header.html");