1.Created a web user control that would act as my pop up
2.Created an aspx page in which I added my web user control
3.In the page I wanted my pop up to appear I added
<a id="pretty-photo-opener" href="/Controls/newsLetterPopUp.aspx?iframe=true&width=620&height=470" rel="prettyPhoto"></a>that will act as the element that will open the pop up
4.In the document ready fuction I implemented the following
<script type="text/javascript">5.Finally, in the my web user control I implemented the following code to close the PrettyPhoto pop up, since I used a custom close button and not the one of the PrettyPhoto
$(document).ready(function() {
$("a[rel^='prettyPhoto']").prettyPhoto({ theme: '', callback: function() { } });
$('#pretty-photo-opener').trigger('click');
}
});
</script>
<script type="text/javascript">For more information about PrettyPhoto check this
function closeBox() {
window.parent.$.prettyPhoto.close();
}
</script>
Δεν υπάρχουν σχόλια:
Δημοσίευση σχολίου