Skip to content

Commit

Permalink
Only prevent clicks on zoom image link
Browse files Browse the repository at this point in the history
  • Loading branch information
i-like-robots committed Mar 9, 2015
1 parent 257b122 commit eff1513
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/easyzoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,9 @@
.on('mouseleave.easyzoom touchend.easyzoom', $.proxy(this._onLeave, this))
.on('mouseenter.easyzoom touchstart.easyzoom', $.proxy(this._onEnter, this));

if (this.opts.preventClicks) {
this.$target.on('click.easyzoom', 'a', function(e) {
e.preventDefault();
});
}
this.opts.preventClicks &&this.$target.on('click.easyzoom', function(e) {
e.preventDefault();
});
};

/**
Expand Down

0 comments on commit eff1513

Please sign in to comment.