Prettyphoto (lightbox clone) problems
Moderator: General Moderators
-
alecgatenby
- Forum Newbie
- Posts: 3
- Joined: Thu Jul 02, 2009 9:54 am
Prettyphoto (lightbox clone) problems
Hello, I am having two specific problems with the prettyphoto javascript and they are not addressed on the developers FAQ page. When i create a gallery of images, lets say 8, the lightbox window opens and displays the 8th photo with the text saying 8/8 images. It does not start at 1!? seems illogical to me. Anyone know hot to fix this? M<y second problem is setting the window size for movies, prettyphoto developer says put the height and width in the same line of text as rel="prettyPhoto", did that and it didn't work. Any ideas? (http://homepage.mac.com/alecgatenby/ken ... index.html)
Re: Prettyphoto (lightbox clone) problems
Lightbox is working correctly.
It will take all photos in a order as they appear in DOM.
When user clicks a link, 'href' is checked and matched against loaded images. In all visible links you have href pointing to last image.
To make it as you want it, instead of
you should have
It will take all photos in a order as they appear in DOM.
When user clicks a link, 'href' is checked and matched against loaded images. In all visible links you have href pointing to last image.
To make it as you want it, instead of
Code: Select all
<a title="Jordans" rel="prettyPhoto[jordans]" href="media/fullsize/jordans/6.jpg">Code: Select all
<a title="Jordans" rel="prettyPhoto[jordans]" href="media/fullsize/jordans/1.jpg">-
alecgatenby
- Forum Newbie
- Posts: 3
- Joined: Thu Jul 02, 2009 9:54 am
Re: Prettyphoto (lightbox clone) problems
Your reply did not help, I changed the order of the links and it makes no difference to the way it displays through lightbox. I think the problem lies somewhere in the Javascript, something I have no knowledge of, hence asking for help here...? Why is it showing 8/8 as first example instead of 1/8? Please help Javascript people!?
Re: Prettyphoto (lightbox clone) problems
Visible image href is at the end of the list, that's why it's showing 8/8. To show 1/8 and first image, you need your href to be in the begining.
Code what I posted before was wrong
, following should work
Code what I posted before was wrong
Code: Select all
<!-- HREF of the link now is 1.jpg, it will show 1/8 in lightbox -->
<a href="media/fullsize/ingicons/1.jpg" rel="prettyPhoto[ing]" title="ING" onmouseover="MM_swapImage('ing1','','media/thumbtexts/ING-Bank.gif',1)" onmouseout="MM_swapImgRestore()">
<img src="thumbs/ingicons.jpg" alt="ING billboard" width="99" height="107" border="0" />
</a>
<!-- rest of the links must go after visible link -->
<a href="media/fullsize/ingicons/2.jpg" rel="prettyPhoto[ing]" title="ING"> </a>
<a href="media/fullsize/ingicons/3.jpg" rel="prettyPhoto[ing]" title="ING"> </a>
<a href="media/fullsize/ingicons/4.jpg" rel="prettyPhoto[ing]" title="ING"> </a>
<a href="media/fullsize/ingicons/5.jpg" rel="prettyPhoto[ing]" title="ING"> </a>
<a href="media/fullsize/ingicons/6.jpg" rel="prettyPhoto[ing]" title="ING"> </a>
<a href="media/fullsize/ingicons/7.jpg" rel="prettyPhoto[ing]" title="ING"> </a>
<a href="media/fullsize/ingicons/8.jpg" rel="prettyPhoto[ing]" title="ING"> </a>