slick.js

How can I change the width and height of slides on Slick Carousel?

可紊 提交于 2019-11-28 06:23:23
http://kenwheeler.github.io/slick/ A friend suggested that I use Ken Wheeler's Slick carousel and I decided to give it a try. I am having a couple of problems with it. The first is that the slides don't load "on top of each other" like they should. They are stacked vertically. When the first slide fades in, it is in the correct spot, however, when the second slide fades in, it is below where the first slide was. Also notice that on the first slide the right border is cut off and on the second slide everything besides the left border is cut off. The second problem is that I can't seem to change

Meteor with iron-router cant get slick carousel working

早过忘川 提交于 2019-11-28 01:30:21
I am using iron-router, i have a route "models" which has a list of items. When the user clicks one of these items a new route "model" is used, the name of the selected item is passed as a param and used to load data about that model from the database. I want to use slick carousel, using an array of images returned from the database (based on the param). <div id="carousel"> {{#each images}} <div class="item"> <img src="/images/{{this}}" alt=""> </div> {{/each}} </div> Where should I call the slick init? Generally speaking, you should initialize plugins in a template's onRendered callback. In

Ionic2 How to use JQuery Plugin in Page

时间秒杀一切 提交于 2019-11-28 00:46:55
问题 I'm a newbie of ionic 2, i create project and need to jquery plugin link colorbox, slick-carousel... I've run the command in a terminal npm install jquery slick-carousel typings install jquery --ambient --save typings install slick-carousel --ambient --save I have imported the JQuery: import * as JQuery from 'jquery'; import * as slick from 'slick-carousel'; Then ionic error is: Can not find module 'slick-carousel'. Please help me solve this problem, or have examples ready so I can refer to.

Error in slick.js: “Uncaught TypeError: Cannot read property 'add' of null”

守給你的承諾、 提交于 2019-11-27 13:42:06
问题 I used slick js for slider view of image. Here is my code. <div class="slider_wrap add-remove"> <%= f.fields_for :images do |image_form| %> <%#= render 'images_fields', :f => image_form %> <div> <%= image_tag image_form.object.picture.url,:class=>"drop_down_link even img_prev" %> </div> <div class="image_upload_div"> <div class="image-upload"> <label> <i class="fa fa-cloud-upload"> <%= image_form.file_field :picture ,:'data-role'=>"none",:onchange=>"readURL(this);" , :accept => 'image/jpeg ,

Slick Carousel with Angular 2

删除回忆录丶 提交于 2019-11-27 12:55:50
问题 Hi I'm starting with Angular 2 and trying to make this carousel plugin to work: slick After a while I managed to make it work like a Component like this: import { Component, Input, ElementRef, AfterViewInit, AfterContentInit} from '@angular/core'; declare var jQuery: any; @Component({ selector: 'slick-slider', template: ` <ng-content></ng-content> ` }) export class SlickSliderComponent implements AfterContentInit{ @Input() options: any; $element: any; defaultOptions: any = {}; constructor

How add spaces between Slick carousel item

▼魔方 西西 提交于 2019-11-27 11:30:27
问题 I want to add space between two slick carousel items, but not want the space with padding, because it's reducing my element size(and I don't want that). $('.single-item').slick({ initialSlide: 3, infinite: false }); .slick-slider { margin:0 -15px; } .slick-slide { padding:10px; background-color:red; text-align:center; margin-right:15px; margin-left:15px; } <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> <link href="https://maxcdn.bootstrapcdn.com

Slick.js: Get current and total slides (ie. 3/5)

不羁的心 提交于 2019-11-27 09:37:23
问题 Using Slick.js - how does one get current and total slides (ie. 3/5) as a simpler alternative to the dots? I've been told I can use the customPaging callback using the callback argument objects, but what does that mean exactly? $('.slideshow').slick({ slide: 'img', autoplay: true, dots: true, customPaging: function (slider, i) { return slider.slickCurrentSlide + '/' + (i + 1); } }); http://jsfiddle.net/frank_o/cpdqhdwy/1/ 回答1: The slider object contains a variable that is containing the slide

How can I change the width and height of slides on Slick Carousel?

南笙酒味 提交于 2019-11-27 05:36:26
问题 http://kenwheeler.github.io/slick/ A friend suggested that I use Ken Wheeler's Slick carousel and I decided to give it a try. I am having a couple of problems with it. The first is that the slides don't load "on top of each other" like they should. They are stacked vertically. When the first slide fades in, it is in the correct spot, however, when the second slide fades in, it is below where the first slide was. Also notice that on the first slide the right border is cut off and on the second

Slick Carousel Uncaught TypeError: $(…).slick is not a function

送分小仙女□ 提交于 2019-11-27 03:43:39
问题 Somehow I'm unable to use slick carousel (http://kenwheeler.github.io/slick/) correctly. I'm getting the following error: Uncaught TypeError: $(...).slick is not a function I'm running the following code in my javascript file: function initSlider(){ $('.references').slick({ dots: false, infinite: true, speed: 300, slidesToShow: 1, autoplay: true, prevArrow: '<div class="slick-prev"><i class="fa fa-chevron-left"></i></div>', nextArrow: '<div class="slick-next"><i class="fa fa-chevron-right"><

Slick Carousel with Angular JS

最后都变了- 提交于 2019-11-27 02:10:57
问题 I am using Slick carousel in one of my AngularJS application. For that I have created directive as follows: myApp.directive('slickSlider',function(){ return { restrict: 'A', link: function(scope,element,attrs) { $(element).slick(scope.$eval(attrs.slickSlider)); } } }); Here is my code in view file: <div class="clearfix" slick-slider="{dots: false, arrows: true, draggable: false, slidesToShow:3, infinite:false}"> <div class="my-slide"> <a><img ng-src="assets/img/img1.png"/></a> </div> <div