The load () function of jquery allows us to load a page (or a part of it) in an element.
Let's make an example with a link and an empty div:
hello!!
By clicking on the link we want to load a page in # description, simply call the load () function in this way:
$(function(){
$('.itemlink').click(function() {
$('#description').load('loaded.html');
});
});
Demo:
No comments:
Post a Comment