Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div id="mydiv">
- </div>
- $("#mydiv").load("/path/to/content.html");
- <div id="mydiv">
- <p>content from file</p>
- </div>
- <div id="mydiv">
- </div>
- <p>content from file<p>
- $.get('url.html', function(data){ // Loads content into the 'data' variable.
- $('#mydiv').after(data); // Injects 'data' after the #mydiv element.
- });
- $('#div_after').remove();
- $('#mydiv').after($('<div>').load('/path/to/content.html #div_after', {
- data: data, //variables to send. Useless in your case
- }, function () {
- $(this).children().unwrap();}
- ));
- $(this).children().unwrap();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement