Skip to content

Commit

Permalink
Use event.currentTarget in changeSlide method
Browse files Browse the repository at this point in the history
This makes sure we are looking at the intended element and still call `.preventDefault()` if the given `nextArrow/prevArrow` contains any children.
  • Loading branch information
ricardobeat committed Jul 28, 2015
1 parent 66a9ee8 commit a82b70b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion slick/slick.js
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@
Slick.prototype.changeSlide = function(event, dontAnimate) {

var _ = this,
$target = $(event.target),
$target = $(event.currentTarget),
indexOffset, slideOffset, unevenOffset;

// If target is a link, prevent default action.
Expand Down

0 comments on commit a82b70b

Please sign in to comment.