Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

html include html page

// js
<script>
$(function () {
  var includes = $('[data-include]')
  $.each(includes, function () {
    var file = $(this).data('include')
    $(this).load(file)
  })
})
</script>
// html
<div data-include="header.html"></div>
<div data-include="footer.html"></div>

https://www.w3schools.com/howto/howto_html_include.asp
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #html #include #html #page
ADD COMMENT
Topic
Name
4+2 =