Load External File With jQuery


Sometimes we need to show the content from an external file on a web page. If you are thinking to load it from IFRAME, you are going to do it wrong. And what if i ask to load content dynamically based on user input. It should be done with a better way. In this tutorial, i am going to show how you can load external file on a web page dynamically with jQuery. I have added a demo and downloadable script in the post.

Demo Download

We will use load function to load external file. I will add new.html file to the div loaded. 


Now create a HTML file and put some content on it. Save this file as new.html in the same directory.


Comment below if you have any problem in implementation.


To Top