Solved

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

Posted on 2013-01-27
5
897 Views
Last Modified: 2013-01-28
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
0
Comment
Question by:dzash2000
  • 3
  • 2
5 Comments
 
LVL 11

Expert Comment

by:mcnute
ID: 38826061
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
0
 

Author Comment

by:dzash2000
ID: 38826638
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.
0
 

Author Comment

by:dzash2000
ID: 38826654
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

0
 
LVL 11

Accepted Solution

by:
mcnute earned 500 total points
ID: 38826678
if you want just to go to another site, then make the thumb being outside of the photoswipe container element.

If you want to open iframes with vidoes or entire websites you'll need another plugin, which is http://www.shadowbox-js.com/
0
 

Author Closing Comment

by:dzash2000
ID: 38826749
I see what you mean.  Thanks for the tip.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
jquery, html5 UI 1 48
Angular - (very close) following an example 20 33
SVG Star 4 16
Login area of a page 4 19
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now