diff options
Diffstat (limited to 'ecomp-portal-FE/client/bower_components/jquery.event.drag-new/event.keyend/jquery.event.keyend.js')
-rw-r--r-- | ecomp-portal-FE/client/bower_components/jquery.event.drag-new/event.keyend/jquery.event.keyend.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/ecomp-portal-FE/client/bower_components/jquery.event.drag-new/event.keyend/jquery.event.keyend.js b/ecomp-portal-FE/client/bower_components/jquery.event.drag-new/event.keyend/jquery.event.keyend.js new file mode 100644 index 00000000..f4a29cfd --- /dev/null +++ b/ecomp-portal-FE/client/bower_components/jquery.event.drag-new/event.keyend/jquery.event.keyend.js @@ -0,0 +1,20 @@ +;(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 );
\ No newline at end of file |