i'm using prettyPhoto for overlaying big images in the frontend of a CMS that i'm developing, and for overlaying some iframes at the backend for attaching some files... for this, i'm launching prettyPhoto from a button... but after a lot of reading, and checking my code, i found that if i don't "initialize" prettyPhoto with:
$('#adjuntaImagen').click( function () {
$.prettyPhoto.open('files.attachSingleImage.php?div_id=attached_images&iframe=true&width=480&height=380','','');
});
i don't know if this is the way that it has to be ,always attaching prettyPhoto to an anchor with rel=prettyPhoto, even if i don't have any anchor at all in the document...
in my code i have this:
$(document).ready(function(){
$("a[rel^='prettyPhoto']").prettyPhoto(); //without this line prettyPhoto doesn't work.
$('#adjuntaImagen').click( function () {
$.prettyPhoto.open('files.attachSingleImage.php?div_id=attached_images&iframe=true&width=480&height=380','','');
});
$('#previsualizar').click( function () {
$.prettyPhoto.open('noticias.preview.php?iframe=true&width=1024&height=600','Previsualizar Página','');
});
});