Two Pages Load In Two Div Onclick Event
I would like to know how to load two pages in two different div at the same page, using onclick event. HTML: Content
Solution 1:
Simply like this :
$('a').click(function() {
$('#FirstDiv').load($(this).attr('href'));
$('#SecondDiv').load('anotherURL.php');
return false;
});
Solution 2:
$("a").on("click", function(e) {
e.preventDefault();
$("#FirstDiv").load(this.href);
$("#SecondDiv").load("url");
});
Post a Comment for "Two Pages Load In Two Div Onclick Event"