You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

28 lines
652 B

  1. define( [
  2. "../core",
  3. "../event",
  4. "./trigger"
  5. ], function( jQuery ) {
  6. jQuery.each( ( "blur focus focusin focusout load resize scroll unload click dblclick " +
  7. "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
  8. "change select submit keydown keypress keyup error contextmenu" ).split( " " ),
  9. function( i, name ) {
  10. // Handle event binding
  11. jQuery.fn[ name ] = function( data, fn ) {
  12. return arguments.length > 0 ?
  13. this.on( name, null, data, fn ) :
  14. this.trigger( name );
  15. };
  16. } );
  17. jQuery.fn.extend( {
  18. hover: function( fnOver, fnOut ) {
  19. return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
  20. }
  21. } );
  22. } );