Skip to content

Commit

Permalink
Merge pull request #66 from slave2zeros/master
Browse files Browse the repository at this point in the history
Don't trigger when no href included on link
  • Loading branch information
snikch committed Aug 6, 2014
2 parents 44f6888 + 1cc4d13 commit 75ea733
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion jquery.dirtyforms.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,10 @@ if (typeof jQuery == 'undefined') throw ("jQuery Required");
}

var aBindFn = function(ev){
var a = $(this);

// Filter out any anchors the helpers wish to exclude
if (!$(this).is(getIgnoreAnchorSelector())) {
if (!a.is(getIgnoreAnchorSelector()) && typeof a.attr('href') != 'undefined') {
bindFn(ev);
}
}
Expand Down

0 comments on commit 75ea733

Please sign in to comment.