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.

33 lines
636B

  1. define( [
  2. "./core"
  3. ], function( jQuery ) {
  4. jQuery.fn.extend( {
  5. bind: function( types, data, fn ) {
  6. return this.on( types, null, data, fn );
  7. },
  8. unbind: function( types, fn ) {
  9. return this.off( types, null, fn );
  10. },
  11. delegate: function( selector, types, data, fn ) {
  12. return this.on( types, selector, data, fn );
  13. },
  14. undelegate: function( selector, types, fn ) {
  15. // ( namespace ) or ( selector, types [, fn] )
  16. return arguments.length === 1 ?
  17. this.off( selector, "**" ) :
  18. this.off( types, selector || "**", fn );
  19. },
  20. size: function() {
  21. return this.length;
  22. }
  23. } );
  24. jQuery.fn.andSelf = jQuery.fn.addBack;
  25. } );