Skip to content

Commit

Permalink
Merge pull request #2 from bradoyler/preventDefault
Browse files Browse the repository at this point in the history
adds preventDefault option
  • Loading branch information
bradoyler committed Mar 19, 2015
2 parents 0f96439 + daa2afc commit f00651f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions jquery.togglecontrols.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@
targetActiveClass: 'is-active',
eventName:'click',
selector:'.tc-dialog',
preventDefault:false,
activeTarget:false
}, options);

$($el).on(defaults.eventName, function(e){
if(defaults.preventDefault) {
e.preventDefault();
}
var data = $(e.target).data('togglecontrols');
var targetEl = e.target;
if(!data) {
Expand Down

0 comments on commit f00651f

Please sign in to comment.