Link to home
Start Free TrialLog in
Avatar of dzash2000
dzash2000Flag for United States of America

asked on

Can I get Photoswipe (jquery) to open a full web page?

Hi -

I'm using a very excellent photo gallery jQuery plug in called Photoswipe.

My test page is linked here.  

On the sample page you will see 4 photo thumbnails and 3 numbered ones.  If you click on a photo thum you see the Pswipe slide show gallery interface.

Is there a way to click on a thum and go to a completely different web page - not a photo in a gallery - not the slide show interface?

If so - is there an expert who can show me how to do that?

TIA
d2
Avatar of mcnute
mcnute
Flag of Germany image

If you have your links hardcoded than it is easy to make them behave like normal links like so:

<a href="http://example.com/affiliate" target="_blank"> 
   <img class="seeMe"  
		src="_img/barga/-thums/thum-BA-01a.jpg" 
      alt="In Barga we stayed at the Alpino Hotel.  
      A nice place on a main street." 
		data-photo-type="close" />  
</a>
 

Open in new window


What I've done here is I changed the href attribute to link it to your external site. The photoswipe plugin recognizes your image links by one of these classes "close all isotope-item". I simply removed all of them and the photoswipe wouldn't trigger on them.

Hope that helped you.
mcnute
Avatar of dzash2000

ASKER

mcnute -
thanks for the reply.  That's what I thought but it still opens the gallery type black screen with the slideshow controls and an X in the middle.  It's still looking for an image.
mcnute - even if I pare it down to bare link - it still opens inside the gallery interface.  

	
 <a href="http://www.cnn.com" target="_blank"> 
   <img src="_img/barga/-thums/thum-BA-01a.jpg"  />  
</a>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of mcnute
mcnute
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I see what you mean.  Thanks for the tip.