javascript - bootstrap carousel acting weird -
so created website this template , found carousel not sliding automatically except first click prev or next button.
i check javascript template , not finding related carousel except adjusting timing.
and can't make carousel keep cycling when put mouse inside carousel, tried using pause option not working
also carousel containing image, want add <a href='#'>
warp image when user click carousel image direct them link prepared...
here my website
in main.js file put space in between #main-slider , .carousel right looks this:
//#main-slider $(function(){ $('#main-slider.carousel').carousel({ interval: 8000 }); });
and should this:
//#main-slider $(function(){ $('#main-slider .carousel').carousel({ interval: 8000 }); });
if not going have in carousel , want <a>
tag in there put in item , position absolutely overlays entire item. want set z-index -1 can still use carousel controls so:
html:
<div class="item active" style="background-image: url('http://sm-trust.com/imagesartikel/v0ko6zeqfa2016-01-29n.jpg')"> <a href="first.html"></a> </div> <div class="item" style="background-image: url('http://sm-trust.com/imagesartikel/8fxdr35luo2016-01-29n.jpg')"> <a href="second.html"></a> </div>
css:
#main-slider .item { position: absolute; top: 0;left: 0;right: 0;bottom: 0; z-index: -1; }
here fiddle of working fiddle
Comments
Post a Comment