Reputation: 2459
I have an HTML template that comes with PrettyPhoto, but I do not know js/jquery. I want to apply prettyphoto for all the images in my website. jquery-prettyphoto.js is included in all the pages.
Upvotes: 0
Views: 234
Reputation: 472
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
$("a[rel^='prettyPhoto']").prettyPhoto();
});
</script>
“Just add rel=”prettyPhoto”
to the link you want prettyPhoto to be enabled on.”
Upvotes: 2
Reputation: 2256
You need to apply any class or rel attribute to the image. And may be something like below will be added on top.
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
$("a[rel^='prettyPhoto']").prettyPhoto();
});
</script>
If you can post any of your one page it will be more clear.
Upvotes: 0