kenwheeler / slick

the last carousel you'll ever need
kenwheeler.github.io/slick
MIT License
28.54k stars 5.89k forks source link

I have to refresh my page to get slick to work #3358

Open sbrycebarker opened 6 years ago

sbrycebarker commented 6 years ago

short description of the bug / issue, provide more detail below.

I have slick displaying projects on my portfolio page but I have to refresh the page to get slick to activate

https://sbrycebarker.github.io/portfolio/#!/

[ paste your jsfiddle link here ]

use this jsfiddle to reproduce your bug: http://jsfiddle.net/simeydotme/fmo50w7n/ we will likely close your issue without it.

====================================================================

Steps to reproduce the problem

  1. ...
  2. ...

====================================================================

What is the expected behaviour?

...

====================================================================

What is observed behaviour?

...

====================================================================

More Details

Regaddi commented 6 years ago

Inside your mainCtrl.js is a commented call for slick:

angular.module('myApp').controller('mainCtrl', function($scope){
  // function slick() {
  //   $('.multiple-items').slick({
  //     infinite: true,
  //     slidesToShow: 1,
  //     slidesToScroll: 1,
  //     dots: true
  //   });
  // }
  // slick()
})

If I call this through the DevTools console, your slider is initialized just fine.

image