I’m finalising some responsive templates at the moment and all is going hunky dory.
Maybe I’m missing it, but is there a way to swipe an object or a button on a page, to trigger an action? I’ve got a series of images with text, that I use a next and back button to scroll through (basic ‘showing’ and ‘hiding’ as these are clicked – nothing fancy).
I’ve been asked if it’s possible to swipe the images themselves to scroll through them. Any help / suggestions / answers with this would be lovely and gratefully received.
The Swipe Right and Swipe Left actions are standard actions that can be attached to a page (e.g. On Swipe Right – do this or that). You cannot attach it to a specific object on a page. But you can do something like “Page – On Swipe Left – Hide image 1, show image 2” + “Page – On Swipe Right – Hide image 2, Show image 1” to add illusion of swiping.
You can add your own copy of Hammer.js if you want to swipe on individual objects. Trivantis already employs Hammer.js when you build a responsive title, however, I have not had the time to examine their embedded code to tap into it. So far adding my own via html Extension has not yielded negative results. It is possible to have conflicts when adding one on top of the one already there but so far so good.
It should be relatively easy for Trivantis to add this functionality to all objects since they are already using and familiar with Hammer.js code.
I still think what you are looking to do is add a lightbox to your project so you can swipe to view individual images. Carousels are another option but are usually for viewing more than one image at a time although you can usually set them up as lightboxes too (Magnific allows this).
This post has received 1 vote up.
This reply was modified 3 years, 11 months ago by Darrel Somoza. Reason: horrible grammar