jquery - skrollr conflicts bx slider custom pager? -
this first time asking question here, i'm quite noob don't mad @ me if mess little.
the thing is, doin 1 page web based on skrollr: https://github.com/prinzhorn/skrollr
and use fantastic slider called bx slider: http://bxslider.com/
i have put 2 of 3 sliders need (those works great). problem comes when try make custom pager in third slider using html code bx slider provides me:
<ul class="bxslider"> <li><img src="/images/730_200/tree_root.jpg" /></li> <li><img src="/images/730_200/houses.jpg" /></li> <li><img src="/images/730_200/hill_fence.jpg" /></li> </ul> <div id="bx-pager"> <a data-slide-index="0" href=""><img src="/images/thumbs/tree_root.jpg" /></a> <a data-slide-index="1" href=""><img src="/images/thumbs/houses.jpg" /></a> <a data-slide-index="2" href=""><img src="/images/thumbs/hill_fence.jpg" /></a> </div>
the problem is, when click 1 of pager items redirects me index.html not allowing me interact actual slider.
as may know, skrollr library use html5 data-
attributes define multiple sets of styles (they call each of them keyframe) , skrollr interpolates between them. in skrollr basic example...
<div data-0="background-color:rgb(0,0,255);" data-500="background-color:rgb(255,0,0);"> wooot </div>
so guess is... in conflict data- attribute in both codes?? if so, why doesn't bother me when code in default bx-slider pager??
how fix this? ideas?
thanks help!! :)
the html needs:
<ul class="bxslider"> <li><img src="/images/pic1.jpg" /></li> <li><img src="/images/pic2.jpg" /></li> <li><img src="/images/pic3.jpg" /></li> <li><img src="/images/pic4.jpg" /></li> </ul>
you should initialize structure, call .bxslider() on
$(document).ready(function(){ $('.bxslider').bxslider(); });
then, can try change css styles in order improve appearance with:
.bx-pager-link{ width: 30px; height: 30px; background-image: url('/images/pic1.jpg'); background-position: center center; background-repeat: no-repeat; background-color: transparent; background-size: 100%; border-radius: 0; }
Comments
Post a Comment