Sabine Quardon
Sabine Quardon

Reputation: 207

Can't seem to get Prettyphoto to work

Been trying for hours now, can't seem to find the problem. http://sabinequardon.dk/poooort/index.html

I've made sure it's linking to the right files etc, but it just doesn't open in prettyphoto. It's prob. a really easy problem, and maybe it's me who've just been starring at it for too long :-(

Thanks!

Upvotes: 1

Views: 1768

Answers (1)

Ohgodwhy
Ohgodwhy

Reputation: 50798

You never invoke prettyPhoto...

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

You're loading jQuery twice, first and foremost. And that overhead is unnecessary. Second, you need to move ALL the scripts BESIDES the one I placed above into the region.

...
<head>
  <script src="assets/js/jquery-1.6.1.min.js" type="text/javascript"></script> 
  <script src="assets/js/jquery.prettyPhoto.js" type="text/javascript" charset="utf-8"></script>
  <!--[if lt IE 9]>
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  <![endif]-->
  <script src="assets/js/jquery.quicksand.js"></script>
  <script src="assets/js/script.js"></script>
</head>

<body>
  ...
  <!---end of the body-->
  <script type="text/javascript">
  $(document).ready(function(){
$("a[rel^='prettyPhoto']").prettyPhoto();
  });
  </script>
</body>

Upvotes: 4

Related Questions