Created
March 7, 2016 02:08
-
-
Save fractefactos/185cf7f6fa06be2345c8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.fn.extend({ | |
trackChanges: | |
function() { | |
$(':input', this).change(function() { | |
$(this.form).data('changed', true); | |
}); | |
$(':textarea', this).change(function() { | |
$(this.form).data('changed', true); | |
}); | |
$(':select', this).change(function() { | |
$(this.form).data('changed', true); | |
}); | |
} | |
, | |
isChanged: | |
function() { | |
return this.data('changed'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment