Created
April 27, 2014 23:02
-
-
Save matthewpizza/06b441249723ab1b0349 to your computer and use it in GitHub Desktop.
Wring data attributes
This file contains hidden or 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
(function($){ | |
$.fn.extend({ | |
wdata : function( key, value ) { | |
this.attr('data-' + key, value); | |
} | |
}); | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage: