jquery - How can I add arrows to my slidershow? -
sorry bad english , i'm newbie jquery. i'm using existing theme html uses "layerslider" , add left , right arrow without change inside code of layerslider.
my html:
<section id="slider"> <div class="ls-wp-fullwidth-container" style="height:600px;"> <div class="ls-wp-fullwidth-helper"> <div id="layerslider_1_1" class="ls-wp-container" style="width:100%;height:600px;margin:0 auto;margin-bottom: 0px;"> <div class="ls-slide" data-ls="transition2d:1;timeshift:-1000;"> <img src="upload/slide3.jpg" class="ls-bg" id="sliderr" alt="slide3" /> <img src="img/prettyphoto/sprite_prev.png" class="ls-l" id="leftarrow" style="top:300px; left: 6% !important; border-radius: 15px; width: 50px;"/> <img src="img/prettyphoto/sprite_next.png" class="ls-l" id="rightarrow" style="top:300px; left: 94% !important; border-radius: 15px; width: 50px;"/> <p class="ls-l" style="top:124px;left:520px;font-weight: 700;height:40px;padding-right:10px;padding-left:10px;font-family:lato, sans-serif;font-size:50px;color:#0f4094;border-radius:3px;white-space: nowrap;" data-ls="offsetxin:0;durationin:2000;delayin:1200;easingin:easeoutelastic;rotatexin:-90;transformoriginin:50% top 0;offsetxout:-200;durationout:1000;"> texto1 </p> <p class="ls-l" style="top:179px;left:520px;font-weight: 700;height:40px;padding-right:10px;padding-left:10px;font-family:lato, sans-serif;font-size:50px;color:#0f4094;border-radius:3px;white-space: nowrap;" data-ls="offsetxin:0;durationin:2000;delayin:1500;easingin:easeoutelastic;rotatexin:-90;transformoriginin:50% top 0;offsetxout:-200;durationout:1000;"> texto2 </p> <img class="ls-l" style="display:none; top:259px;left:535px;white-space: nowrap;" data-ls="delayin:3000;easingin:swing;" src="upload/slider-title-sep.jpg" alt="">--> </div> <div class="ls-slide" data-ls="transition2d:1;timeshift:-1000;"> <img src="upload/plano.jpg" class="ls-bg" id="sliderr" alt="slide1"/> <img src="img/prettyphoto/sprite_prev.png" class="ls-l" id="leftarrow" style="top:300px; left: 6% !important; border-radius: 15px; width: 50px;"/> <img src="img/prettyphoto/sprite_next.png" class="ls-l" id="rightarrow" style="top:300px; left: 94% !important; border-radius: 15px; width: 50px;"/> <p class="ls-l" style="top:254px;left:176px;font-weight: 700;height:40px;padding-right:10px;padding-left:10px;font-family:lato, sans-serif;font-size:50px;color:#ffffff;border-radius:3px;white-space: nowrap;" data-ls="offsetxin:0;durationin:2000;delayin:1500;easingin:easeoutelastic;rotatexin:-90;transformoriginin:50% top 0;offsetxout:-200;durationout:1000;"> texto3 </p> <p class="ls-l" style="top:253px;left:358px;font-weight: 700;padding-top:0px;padding-right:10px;padding-bottom:0px;padding-left:10px;font-family:lato, sans-serif;font-size:50px;color:#ffffff;background:#0e3f93;border-radius:3px;white-space: nowrap;" data-ls="durationin:2000;delayin:2000;rotatexin:-90;transformoriginin:50% top 0;durationout:1000;"> texto4 </p> <img class="ls-l" style="top:352px;left:582px;white-space: nowrap;" data-ls="delayin:3000;easingin:swing;" src="upload/slider-title-sep.jpg" alt=""> </div> </div> </div> </section>
the jquery came theme:
<script data-cfasync="false" type="text/javascript"> var lsjquery = jquery; </script> <script data-cfasync="false" type="text/javascript"> lsjquery(document).ready(function() { if(typeof lsjquery.fn.layerslider == "undefined") { lsshownotice('layerslider_1_1', 'jquery'); }else { lsjquery("#layerslider_1_1").layerslider({ responsiveunder: 1200, layerscontainer: 1200, startinviewport: false, skin: 'themewaves', globalbgcolor: 'transparent', navstartstop: false, hoverbottomnav: true, showcircletimer: false, thumbnailnavigation: 'disabled', autoplayvideos: false, cbinit: function(element) {}, cbstart: function(data) {}, cbstop: function(data) {}, cbpause: function(data) {}, cbanimstart: function(data) {}, cbanimstop: function(data) {}, cbprev: function(data) {}, cbnext: function(data) {}, skinspath: 'http://themes.themewaves.com/craft/wp-content/plugins/layerslider/static/skins/' }) } }); </script> <script data-cfasync="false" type="text/javascript"> var lsjquery = jquery; </script> <script data-cfasync="false" type="text/javascript"> lsjquery(document).ready(function() { if(typeof lsjquery.fn.layerslider == "undefined") { lsshownotice('layerslider_6_2', 'jquery'); }else { lsjquery("#layerslider_6_2").layerslider({ startinviewport: false, pauseonhover: false, forceloopnum: false, autoplayvideos: false, skinspath: 'http://themes.themewaves.com/craft/wp-content/plugins/layerslider/static/skins/' }) } }); </script>
my jquery i'm trying arrows work:
<script type='text/javascript' src='js/jquery.js'></script> <script language="javascript" type="text/javascript"> $(function(){ $("#rightarrow").click(function () { alert("test"); $("#sliderr").fadeout().next().fadein(); }); }); </script>
the alert works when click on right button, , slider become white (fadeout). nothing more happens. no errors on console. if wait more seconds, slider returns work theme, changing pictures itself.
i have tried:
jquery fadeout current div, find next div , fade in or find last , fade in
http://kimjoyfox.com/creating-a-jquery-slideshow-adding-arrow-navigation/
http://line25.com/tutorials/build-a-simple-image-slideshow-with-jquery-cycle
very simple image slider/slideshow left , right button. no autoplay
adding next , arrows jquery slideshow
i dont know more can do. can me please? thanks.
Comments
Post a Comment