Avatar of Adam_Li
Adam_LiFlag for Norway

asked on 

Anyone familiar with PhotoSwipe?

Hi
I have downloaded PhotoSwipe and try to have it run as i want on our website. Im almost done but I have an issue. The JS-application runs in page load but i want it to run on btn click. I have a button that starts the JS but thats only possible after the JS has been closed.

http://photoswipe.com/documentation/getting-started.html 
Go to line "At the end you should get something like this:" and try the solution open Source from "@dimsemenov".
You see that the application start by showing images. If you click "close" (X) in upper right corner you se a button named "OpenPhotoSwipe". Thats how i want it; just a button running JS.
JavaScriptHTML

Avatar of undefined
Last Comment
Leonidas Dosas
Avatar of Shaun Vermaak
Shaun Vermaak
Flag of Australia image

Did you look at the code on codepen?
http://codepen.io/dimsemenov/pen/gbadPv
Avatar of Adam_Li
Adam_Li
Flag of Norway image

ASKER

Yes. What do you mean? I have doe this Solution on my website but i want it to load by clicking button. Not at start.
ASKER CERTIFIED SOLUTION
Avatar of Leonidas Dosas
Leonidas Dosas
Flag of Greece image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
JavaScript
JavaScript

JavaScript is a dynamic, object-based language commonly used for client-side scripting in web browsers. Recently, server side JavaScript frameworks have also emerged. JavaScript runs on nearly every operating system and in almost every mainstream web browser.

127K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo