Skip to content

Commit

Permalink
allow .unslider("fn") chaining
Browse files Browse the repository at this point in the history
  • Loading branch information
Visual Idiot committed Nov 20, 2015
1 parent 561bf97 commit 23e5c3e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/js/unslider-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions src/js/unslider.js
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@


// Fade between slides rather than, uh, sliding it
self.animateFade = function(to, dir) {
self.animateFade = function(to) {
var $active = self.$slides.eq(to).addClass(self.options.activeClass);

// Toggle our classes
Expand Down Expand Up @@ -557,7 +557,9 @@
return $.isFunction(call) && call.apply($this, args);
}

return $.isFunction(call) && call();
$.isFunction(call) && call();

return this;
}

return $this.data('unslider', new $.Unslider($this, opts));
Expand Down

0 comments on commit 23e5c3e

Please sign in to comment.