clickable image within a div
pI have a swipe gesture working the way I would like, when the user swipes
from right/left the images toggle. Now I just want to add a different link
to each img src, so slider1 has a different link associated to it then
slider2, etc. Can someone please help me figure this out?/p
precodelt;pregt; lt;a href=#gt;lt;img src=../question_header/question.png
/gt;lt;/agt; lt;div class=nfootergt;lt;/divgt; lt;div id='mySwipe'
style='width:720px; height:981px; margin-top:55px;' class='swipe'gt;
lt;div class='swipe-wrap'gt; lt;divgt;lt;img src=../slider/slider1.png
/gt;lt;/divgt; lt;divgt;lt;img src=../slider/slider2.png /gt;lt;/divgt;
lt;divgt;lt;img src=../slider/slider3.png /gt;lt;/divgt; lt;divgt;lt;img
src=../slider/slider4.png /gt;lt;/divgt; lt;/divgt; lt;/divgt; lt;script
src=//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.jsgt;lt;/scriptgt;
lt;script src='swipe.js'gt;lt;/scriptgt; lt;scriptgt; // pure JS var elem
= document.getElementById('mySwipe'); window.mySwipe = Swipe(elem, { //
startSlide: 4, // auto: 3000, // continuous: true, // disableScroll: true,
// stopPropagation: true, // callback: function(index, element) {}, //
transitionEnd: function(index, element) {} }); // with jQuery //
window.mySwipe = $('#mySwipe').Swipe().data('Swipe'); lt;/scriptgt;
lt;/pregt; /code/pre
No comments:
Post a Comment