Questions tagged [jquery-load]

The .load() method in jQuery provides the ability to load content into the selected elements.

The .load() Load data from the server and place the returned HTML into the matched element.

.load( url [, data ] [, complete ] )

This method is the simplest way to fetch data from the server. It is roughly equivalent to $.get(url, data, success) except that it is a method rather than global function and it has an implicit callback function. When a successful response is detected (i.e. when textStatus is "success" or "notmodified"), .load() sets the HTML contents of the matched element to the returned data. This means that most uses of the method can be quite simple:

Example:

$( "#result" ).load( "ajax/test.html" );
318 questions
2
votes
3 answers

jQuery .load() but exclude script tags

I am using the following jQuery to load in 5 pages into the current page $('.main').load('main.cfm'); $('.bu1').load('bu1.cfm'); $('.bu2').load('bu2.cfm'); $('.bu3').load('bu3.cfm'); $('.bu4').load('bu4.cfm'); But each .cfm has the following script…
ngplayground
  • 20,365
  • 36
  • 94
  • 173
2
votes
2 answers

jQuery .load sending variables

Im starting off easy, but cant work out why this doesnt work. >