Autor | Zpráva | ||
---|---|---|---|
Paul Profil |
Zdravím,
mám menší problém a budu velice rád za všechny rady. Můj problém spočívá v tom že my nefunguje v daném slideru "active" class, jako u první poloky slideru na mé testovací stránce. V podstatě potřebuji zprovoznit hover efekt na ten seznam položek. Mám tento slider jen jsem ho upravil. bootsnipp.com/snippets/featured/news-carousel Testovací stránka: dev.rewiz.eu Část kodu který odebírá a přidává active class: $(document).ready(function(){ var clickEvent = false; $('#myCarousel').carousel({ interval: 4000 }).on('click', '.list-group li', function() { clickEvent = true; $('.list-group li').removeClass('active'); $(this).addClass('active'); }).on('slid.bs.carousel', function(e) { if(!clickEvent) { var count = $('.list-group').children().length -1; var current = $('.list-group li.active'); current.removeClass('active').next().addClass('active'); var id = parseInt(current.data('slide-to')); if(count == id) { $('.list-group li').first().addClass('active'); } } clickEvent = false; }); }) $(window).load(function() { var boxheight = $('#myCarousel .carousel-inner').innerHeight(); var itemlength = $('#myCarousel .item').length; var triggerheight = Math.round(boxheight/itemlength-4); $('#myCarousel .list-group-item').outerHeight(triggerheight); }); |
||
ondra15 Profil |
Koukni do konzole, ty tam máš 3 chyby. Ty první odstraň, potom si myslím, že bude slider pracovat dobře.
Chyby: - dev.rewiz.eu/css/animate.min.css Failed to load resource: the server responded with a status of 404 (Not Found) - Uncaught TypeError: $(...).metisMenu is not a function - dev.rewiz.eu/css/animate.min.css Failed to load resource: the server responded with a status of 404 (Not Found) |
||
Paul Profil |
#3 · Zasláno: 21. 6. 2016, 12:56:31
Děkuji, opraveno.
|
||
Časová prodleva: 9 let
|
0