Skip to content

Instantly share code, notes, and snippets.

View odyniec's full-sized avatar

Michał Wojciechowski odyniec

View GitHub Profile
@odyniec
odyniec / gist:3454084
Created August 24, 2012 18:33
Using a get valHook in a jQuery plugin
(function ($) {
// jQuery plugin definition
$.fn.bytesInput = function () {
$(this).filter('input[type="text"]').each(function() {
$(this).data('bytesInput', true);
});
return this;
};
var origHook;