Sha256: 59b55748b68c9122520c4a909d8825780e3f573597f2a5e24318563101e0ff0d
Contents?: true
Size: 579 Bytes
Versions: 11
Compression:
Stored size: 579 Bytes
Contents
;(function( $ ){ $.fn.keyend = function( fn ){ return this[ fn ? "bind" : "trigger" ]( "keyend", fn ); }; var keyend = $.event.special.keyend = { delay: 400, setup: function( data ){ $( this ).bind("keypress",{ delay: data.delay }, keyend.handler ); }, teardown: function(){ $( this ).unbind("keypress", keyend.handler ); }, handler: function( event ){ clearTimeout( event.data.timer ); event.data.timer = setTimeout(function(){ $( event.currentTarget ).keyend(); }, event.data.delay || keyend.delay ); } }; })( jQuery );
Version data entries
11 entries across 11 versions & 1 rubygems