Skip to content

Instantly share code, notes, and snippets.

@avireni
Created April 12, 2012 21:45
Show Gist options
  • Save avireni/2371213 to your computer and use it in GitHub Desktop.
Save avireni/2371213 to your computer and use it in GitHub Desktop.
jQuery Ajax request
$(document).ready(function() {
$('#mytarget').load( '/js/remote-file.php', { id: '1' });
});
Call the load function with the address of the script, with optional parameters.
Will call /js/remote-file.php?id=1 and return the results inside the div with the id 'mytarget'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment