I am very new to jQuery, Ajax and similar things. I found solutions on how to inject HTML snippets into my website:
$(document).ready(function(){
$('a').click(openContent);
});
function openContent(){
var path = $(this).attr('href');
$('#content').load(path);
return false;
}
This works great! The problem is that this function will not be executed when clicking on the anchors located in the new HTML fragment that were entered right before that. Thus, the fragment will not be entered into the div, the browser will only download the fragment for itself.
Hope there are solutions that are not so complicated ... thanks
UPDATE:
Alright, living does a good job BUT,
There are also images related to the jQuery lightbox (balupton-edition) plugin with rel = "lightbox-tour" in these snippets. They appear in a new window instead of lightbox-div. Any suggestions?