js+php在线截图 jquery fileupload.js,jquery.fileupload-image-editor.js

jquery.fileupload-image-editor.js中

_initEventHandlers: function () {

this._super();

var handlers = {};

handlers[this.options.uploadImageEditorPreviewSelector] = this._previewHandler.bind(this);

this._on(this.options.filesContainer, handlers);

},

jquery.ui.widget.js

_on: function( suppressDisabledCheck, element, handlers ) {

var delegateElement,

instance = this;

// no suppressDisabledCheck flag, shuffle arguments

if ( typeof suppressDisabledCheck !== "boolean" ) {

handlers = element;

element = suppressDisabledCheck;

suppressDisabledCheck = false;

}

// no element argument, shuffle and use this.element

if ( !handlers ) {

handlers = element;

element = this.element;

delegateElement = this.widget();

} else {

element = delegateElement = $( element );

this.bindings = this.bindings.add( element );

}

_on( [suppressDisabledCheck ] [, element ], handlers )Returns: jQuery (plugin only)

Binds event handlers to the specified element(s). Delegation is supported via selectors inside the event names, e.g., "click .foo". The _on() method provides several benefits of direct event binding:

Maintains proper this context inside the handlers.

Automatically handles disabled widgets: If the widget is disabled or the event occurs on an element with the ui-state-disabled class, the event handler is not invoked. Can be overridden with the suppressDisabledCheck parameter.

Event handlers are automatically namespaced and cleaned up on destroy.

suppressDisabledCheck (default: false)

Type: Boolean

Whether or not to bypass the disabled check.

element

Type: jQuery

Which element(s) to bind the event handlers to. If no element is provided, this.element is used for non-delegated events and the widget element is used for delegated events.

handlers

Type: Object

An object in which the keys represent the event type and optional selector for delegation, and the values represent a handler function to be called for the event.

Code examples:

Prevent the default action of all links clicked within the widget's element.

this._on( this.element, {

"click a": function( event ) {

event.preventDefault();

}

});

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值