user1110562 user1110562 - 16 days ago 8
Javascript Question

Pretty Photo not working

Why is my implementation of Pretty Photo not firing on the image gallery on this page?

$(document).ready(function(){
$("a[rel^='prettyPhoto']").prettyPhoto();
});

<a href="gala2016-photos/photo1-large.jpg" rel="prettyPhoto[pp_gal]" title=""><img src="gala2016-photos/photo1-small.jpg" alt="" /></a>
<a href="gala2016-photos/photo2-large.jpg" rel="prettyPhoto[pp_gal]" title=""><img src="gala2016-photos/photo2-small.jpg" alt="" /></a>

Answer

The library prettyPhoto needs jquery $.browser but it's deprecated. https://api.jquery.com/jquery.browser/

Try updating the prettyPhoto library

Comments