15

I have a website which I want to have a consistent style (a header and a side menu) in every page.

I want to create something similar to a master page for it. I don't want to use frames.

How could I achieve this using HTML, CSS, JavaScript and jQuery?

Robert MacLean
  • 38,975
  • 25
  • 98
  • 152
Aisha
  • 358
  • 1
  • 3
  • 12

1 Answers1

24

you can use jQuery Load function to include header or menu html page, for example, to include a common header html file,

    <div id="new-header">
        <script>
            $("#new-header").load("header.html");
        </script>
    </div>
Able Alias
  • 3,824
  • 11
  • 58
  • 87