If Pretty Photo is reasonably well written, and you 're using:
Code:
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
$("a[rel^='prettyPhoto']").prettyPhoto();
});
</script
to initialize it in the first place, edit this part of the AJAX script:
Code:
function loadpage(page_request, containerid){
if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1))
document.getElementById(containerid).innerHTML=page_request.responseText
}
to:
Code:
function loadpage(page_request, containerid){
if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1)){
document.getElementById(containerid).innerHTML=page_request.responseText;
$("a[rel^='prettyPhoto']").prettyPhoto();
}
}
If you're using a different initialization, use the corresponding part of it there instead.
If you want more help:
Please post a link to a page on your site that contains the problematic code so we can check it out.
As a side note - jQuery has robust AJAX routines, so you should consider using it for the AJAX part, save some overhead on loading the page. But doing so might require some custom coding and an understanding of jQuery AJAX functions, unless you can find a jQuery AJAX plugin that's easily adaptable to your purposes.
Bookmarks