Need help..
I have an index.php
page. On that page, I have a link to page-2.php
.
On page-2.php
,
i also have a link to other page. May I know how to load the link on page-2.php
in a same div on index.php
page.
I'm using jQuery load method do to this. I'm able to load page-2.php
inside a div
on index.php
. Below are the codes that I made.
$(document).ready(function() {
$('a#staff_info').click(function(e){ //link to page-2.php
e.preventDefault();
var page = $(this).attr('href');
$('#content').load(page);
$('a#upd_staff').click(function(){ //link on page2.php
var page_info = $('a#upd_staff').attr('href');
$('#content').load(page_info);
});
});
});
the above code will direct me to a new page not on a same div