nexus site path corrected
[portal.git] / ecomp-portal-FE / client / bower_components / jquery.event.drag-new / event.keyend / jquery.event.keyend.js
1 ;(function( $ ){
2         $.fn.keyend = function( fn ){
3                 return this[ fn ? "bind" : "trigger" ]( "keyend", fn );
4         };
5         var keyend = $.event.special.keyend = {
6                 delay: 400,
7                 setup: function( data ){
8                         $( this ).bind("keypress",{ delay: data.delay }, keyend.handler );
9                 },
10                 teardown: function(){
11                         $( this ).unbind("keypress", keyend.handler );
12                 },
13                 handler: function( event ){
14                         clearTimeout( event.data.timer );
15                         event.data.timer = setTimeout(function(){
16                                 $( event.currentTarget ).keyend();
17                         }, event.data.delay || keyend.delay );
18                 }
19         };
20 })( jQuery );