load content with jquery

Load data from the server and place the returned HTML into the matched element.

this one seems simple but very useful

$( "#result" ).load( "ajax/test.html" );

this one will load the content of test.html into the div with the id result

if you want to load the data and then do something after this one is for you

$( "#result" ).load( "ajax/test.html", function() {
  alert( "Load was performed." );
});

Links

p>https://api.jquery.com/load/

Demo

Other Items in js
Page Views

This page has been viewed 67 times.

Search Code
Search Code by entering your search text above.
Welcome

This is my test area for webdev. I keep a collection of code snippits here, mostly for my reference. Also if i find a good site, i usually add it here.

❤👩‍💻🕹