Open new page only the top of the main page

0

Hey guys!

I am a beginner in web development and would like to ask a simple question. How do I open only the top of the page. For example: I have the main page with several contents, including a menu and slide. I created a page where it will be an article for example. How to pull only this menu and slide from this main page?

Thanks for the help!

    
asked by anonymous 16.05.2018 / 16:58

1 answer

0

You can do this using jQuery's load method.

In your HTML:

  

Let's start from the fact that you already have a page with the menu and the slide and here is another page where this page will be loaded with your menu and slide.

<div id="menu-slide"></div>

jQuery:

  

On this same page you load into this div (menu-slide) the page that has only the part of the menu and the slide.

$("#menu-slide").load(pag-menu-slide.html);

More information see here .

    
16.05.2018 / 17:25