I want to change the <div id="main">
content without reloading the page.
What is the best method for that? I want to do this for all of the links/buttons on my site
I want to change the <div id="main">
content without reloading the page.
What is the best method for that? I want to do this for all of the links/buttons on my site
Use Ajax (Asynchronous JavaScript and XML) to load content and integrate it into your page without reloading the page itself.
See the following links for more information:
What is AJAX and how does it work?
Since what you want is to use a div
to show the whole app, I recommend using a JavaScript Framework for that.
Check out VueJS and how to integrate it with Laravel on this free course
Alternatively, you can check other Frameworks like Angular2, ReactJS, or even jQuery