0

Possible Duplicate:
Implementing the prettyPhoto jQuery plugin

I am working on a web site and would like each photo to be opened up with the jQuery lightbox plugin called prettyPhoto. I have included these files in the head but it seems that they are not being recognized. It says on this page that all I need to do is add the rel="prettyPhoto" to my link tag. I am pretty much a JavaScript and jQuery newbie, so any help would be appreciated.

Here is the link to my site:

http://mcmach.com/mcmachine/photogallery.html

Community
  • 1
  • 1
dan
  • 1
  • 1
  • 1
  • Dan, I answered your question this morning here: http://stackoverflow.com/questions/7067839/implementing-the-prettyphoto-jquery-plugin/7068234#7068234. You should not post the same question twice. – Sparky Aug 16 '11 at 05:47
  • 1
    While the newer question is technically the duplicate, I've closed this one because the bulk of the answers are on the other. – Tim Post Aug 16 '11 at 06:28
  • @Tim Post: It also looks like Dan has two unique SO accounts. Perhaps they should be merged? – Sparky Aug 16 '11 at 15:11

1 Answers1

-1

firstly include only one version of jQuery in your head (best would be 1.4.4)

Then i suppose the main CSS files for the functioning of prettyPhoto is missing (prettyPhoto.css)

Remove the target tag from all the photos

and you have also not included the JavaScript snippet to link it to the lightbox ,Here it is:

<script charset="utf-8" type="text/javascript">
$(document).ready(function(){ 
$("a[rel^='prettyPhoto']").prettyPhoto();  
});  
</script> 

For more details check out http://www.stylifyyourblog.com/2011/06/prettyphoto-is-jquery-lightbox-clone.html

  • Why "would it be best" to include jQuery 1.4.4 when prettyPhoto is fully compatible with the latest, jQuery 1.6.2? – Sparky Aug 16 '11 at 05:44