Jump to content
  • 0

Несколько слайдов на одной странице


vadnet20
 Share

Question

Подскажите хочу расположить несколько слайдов на одной странице Скрин взят из сайта http://pcvector.net/scripts/slideshow_and_scroller/173-slayder-s-postranichnoy-navigaciey.html

<div id="slidebox"><div class="next"></div><div class="previous"></div><div class="thumbs"><a href="#" onclick="" class="1 thumbActive">1</a> <a href="#" onclick="" class="2">2</a> <a href="#" onclick="" class="3 ">3</a> <a href="#" onclick="" class="4">4</a> </div> <ul> <li><img src="1.jpg" alt="змея"/></li> <li><img src="2.jpg" alt="змея"/></li> <li><img src="3.jpg" alt="змея"/></li> <li><img src="4.jpg" alt="змея"/></li> </ul></div>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script><p></p><p><script src="jcarousellite_1.0.1c5.js" type="text/javascript"></script><script type="text/javascript"> $(function() { $("#slidebox").jCarouselLite({ vertical: false, hoverPause:true, btnPrev: ".previous", btnNext: ".next", visible: 1, start: 0, scroll: 1, circular: true, auto:1000, speed:500, btnGo: [".1", ".2", ".3", ".4"], afterEnd: function(a, to, btnGo) { if(btnGo.length <= to){ to = 0; } $(".thumbActive").removeClass("thumbActive"); $(btnGo[to]).addClass("thumbActive"); } });});</script></p>

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Дежурный выход - меняйте переменые. В вашем случаеи это классы (1, 2, 3, 4). И прописываете ещё один скрипт


<script type="text/javascript"> $(function() { $("#slidebox").jCarouselLite({ vertical: false, hoverPause:true,
btnPrev: ".previous", btnNext: ".next", visible: 1, start: 0, scroll: 1, circular: true, auto:1000, speed:500, btnGo:
[".1", ".2", ".3", ".4"], afterEnd: function(a, to, btnGo) { if(btnGo.length <= to){ to = 0; }
$(".thumbActive").removeClass("thumbActive"); $(btnGo[to]).addClass("thumbActive"); } });});</script>

(с новыми переменными только)

Хотя это не универсальный и не красивый способ. А что происходит, если просто вставить 2 слайдера, ничего не меняя?

Edited by alexandr_v-vich
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy