Skip to content

Commit

Permalink
Properly addresses kenwheeler#908 - when carousel initialises with au…
Browse files Browse the repository at this point in the history
…toplay off, but

pauseOnHover to true, then calls `play` ; now it correctly allows
`pauseOnHover`
  • Loading branch information
simeydotme committed Jan 23, 2016
1 parent 3b50d87 commit f9f17f3
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions slick/slick.js
Original file line number Diff line number Diff line change
Expand Up @@ -1013,7 +1013,7 @@

setTimeout(function() {

if( _.options.autoplay && _.options.pauseOnFocus ) {
if( _.options.pauseOnFocus ) {
_.focussed = $sf.is(':focus');
_.autoPlay();
}
Expand Down Expand Up @@ -1344,14 +1344,10 @@

var _ = this;

if ( _.options.autoplay ) {

if ( _.options.pauseOnHover ) {

_.$list.on('mouseenter.slick', $.proxy(_.interrupt, _, true));
_.$list.on('mouseleave.slick', $.proxy(_.interrupt, _, false));

}
if ( _.options.pauseOnHover ) {

_.$list.on('mouseenter.slick', $.proxy(_.interrupt, _, true));
_.$list.on('mouseleave.slick', $.proxy(_.interrupt, _, false));

}

Expand Down

0 comments on commit f9f17f3

Please sign in to comment.