I have a simple piece of PHP which generates n copies of the following code:
Add the complete URL to your link (or p
in this case) using a data attribute:
Click Here to See Data
Then do all the binding directly in your jQuery so you have direct access to the link that was clicked:
$(document).ready(function() {
$('.ShowSDB_L2').on('click', function(e) {
e.preventDefault();
$('.divSDB_L2').empty().load($(this).data('loadurl')).show();
});
});