slick.js

Slick slider - Adding active class to first < a > in currently open foundation tab

自古美人都是妖i 提交于 2019-12-24 08:19:52
问题 Trying to add an active class to the first a tag within a selected tab. My code is adding the active class to the very first element in slide one and doing exactly what I want within slider one but then when I change tabs it is still adding the active class to the navigation on the first slider not slider 2 that is in view. JS $(document).ready(function(){ var $slideshow = $(".slider").slick({ dots: false, infinite: true, speed: 300, slidesToShow: 1, adaptiveHeight: true, swipeToSlide: true,

Slick slider goto first slide

自闭症网瘾萝莉.ら 提交于 2019-12-24 07:27:21
问题 The Slick slider is set to autoplay. At the time of play, the slides comes from left to right or first to last. When the slider is reached at the last slide, it starts autoplaying from the last slide to first slide in backward direction. I want the slider to play from the first slide instead of last when the slider is reached at the last slide. Initially when the infinite scroll was 'true', everything was working fine. But due the requirement, I had to set the infinite scroll to 'false'. The

Tab panels swipe-able in mobile view?

橙三吉。 提交于 2019-12-24 00:44:33
问题 I have a tabbed menu and I want the tabbed menu (the ul class="tabs" ) to be swipe-able in mobile view. EDIT: I found a snippet on using Slick JS , I never knew about this JS but I want it to apply this codepen on my current tabbed menu. How to combine with my current tabbed menu properly? I tried to combine it but the current UI design of my tabbed menu getting messed up. Here's my codepen of tabbed menu <section class="wrapper"> <ul class="tabs"> <li class="active"><span class="icons-tabbed

Pictures of Slick carousel do now show only after coming back from a successful Facebook Connect

爷,独闯天下 提交于 2019-12-23 04:34:16
问题 I am using Slick carousel for this testimonials box: I have this button to log in using Facebook: Immediately after a successful Facebook Connect login, the Slick carousel still works but all pictures are broken: If I click around for example by clicking the logo of the home page to reload the page, everything is fixed and the pictures appear again correctly. What could be the cause of this bug? I noticed that after logging in with Facebook, the URL changes from https://example.net/San

Click event doesn’t fire after browser resize

你离开我真会死。 提交于 2019-12-23 04:17:11
问题 I’m currently using slick, a carousel. When the browser is resized below a certain threshold, I have the carousel set to unslick (meaning it stops being a carousel and each carousel panel is displayed statically one on top of another). The setting is this: responsive:[{ breakpoint: 992, settings: "unslick" }] It works great. However, I also have a .click function that’s called when an element in the carousel is clicked on. Something like: $(document).ready(function(){ $('#linkInCarousel')

Appying Javascript dynamically to videos within a slick.js Slider

主宰稳场 提交于 2019-12-23 02:47:06
问题 Fiddle Here Is it possible to have javascript that pauses a slide containing video for that video to play to completion on a specific slide #N instead apply to any slide containing an <video> ? I currently have this code to pause the slide when it reaches #5 for this example: $('.sliderMain').on('afterChange', function(event, slick, currentSlide){ if (currentSlide == 5) { $('.sliderMain').slick('slickPause'); theVideo.play(); And this code to resume the slide once the video finishes playing:

Slick carousel moving nav dots

混江龙づ霸主 提交于 2019-12-23 02:41:10
问题 I am using http://kenwheeler.github.io/slick carousel and I need to limit dots number to 8 even if there more than 8 slides. Nav dots should have arrows to the left and to the right that suggest user that there are more dots to show. Can anybody suggest a solution / had similar experience in customizing nav dots with slick? 回答1: I came up with a solution to limit the number of dots to three using CSS /* hiding all bullets by default */ .slick-dots li { display: none } /* only displaying the

Slick carousel loads the wrong width on initialization

孤者浪人 提交于 2019-12-22 05:14:34
问题 On page load, for the first second of so, the first slide only takes up half of the screen before correcting itself. It is causing an unpleasant/snappy load experience. If I monitor the elements code via inspect I can see the inline width get updated about a second into page load. Any suggestions? 回答1: i have same problem solution is start from prev slide (initialSlide: ...) and call slick('slickNext') 来源: https://stackoverflow.com/questions/36944421/slick-carousel-loads-the-wrong-width-on

Detect when slick slider initialises

守給你的承諾、 提交于 2019-12-22 03:25:09
问题 I'm trying to fire some code when slick initializes. Apparently in the newest version 1.4 "callback methods have been deprecated and replaced with events." This doesn't work for me though: $('.spv-slider').on('init', function(event, slick){ console.log("initialised") }); what's wrong with it? 回答1: I'm not sure at which point you tried to initialize slickslider, but you have to do it after binding the init event. So write your piece of code as you did and after that initialize the slider: $('

add autoplay for video in slick carousel

孤人 提交于 2019-12-22 02:38:10
问题 I use slick carousel http://kenwheeler.github.io/slick/ on my page and now I need to add video with autoplay in it. I use this code HTML <div class="main-slider" id="main-slider"> <div> <div class="video-wrapper"> <video autoplay loop class="pageBackground-video"> <source src="/Content/video/332145276.mp4" type="video/mp4"> </video> </div> </div> <div> <div class="video-wrapper"> <video autoplay loop class="pageBackground-video"> <source src="/Content/video/332145276.mp4" type="video/mp4"> <