whatever the div contains, when clicked (#g1) it will add the content.
1 2 3 4 5 6 |
$('#g1').click(function(){ $(this).parent().append('<a href="#">I\'m a new link</a>'); return false; }); |
To append a web page to a div use post
1 2 3 4 5 6 7 |
$.post("dog.php",function(myresult){ $(".divarea").append(myresult); }); |