javascript - Buggy jQuery <div> slider -
i'm trying build div slider html, css , jquery (which don't have knowledge yet).
the problem when can't display third div, , when (with changes in code) cant go previous slide.
could me code please. , sorry messy , strange syntax, i'm still not @ it.
jquery code slider:
$(function () { $('a.scroll').on('click', function (event) { event.preventdefault(); var $anchor = $(this), $section = $anchor.attr('data-section'); if ($section === '4' || $section === '2' || $section === '3') { $('#wrap .wrap-inner').addclass('goto-' + $section); } else { $('#wrap .wrap-inner').removeclass('goto-2 goto-3'); } }); });
the html , css present on fiddle below, example of second :
<div class="section" id="section2"> <div class="arrowdiv"><a class="scroll" href="#section1" data-section="1"><img class="white"src="imgs/go_back.png" /></a> </div> <div class="form formtitle"> <h1 class="alpha">second</h1> </div> <div class="arrowdiv"><a class="scroll" href="#section3" data-section="3"><img class="white"src="imgs/go_next.png" /></a> </div> </div>
here's fiddle: http://bit.ly/1cucuf6
answers i'm looking for: how make display more 2 divs , how make , next arrows work on every slide.
Comments
Post a Comment