mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Replace element.data(...) with $.data(element, ...). Fixes #5756 - Widget: Use $.data instead of .data for performance reasons
This commit is contained in:
parent
39f0c1010a
commit
b3940d2f78
3
ui/jquery.ui.widget.js
vendored
3
ui/jquery.ui.widget.js
vendored
@ -129,7 +129,8 @@ $.Widget.prototype = {
|
||||
_createWidget: function( options, element ) {
|
||||
// $.widget.bridge stores the plugin instance, but we do it anyway
|
||||
// so that it's stored even before the _create function runs
|
||||
this.element = $( element ).data( this.widgetName, this );
|
||||
$.data( element, this.widgetName, this );
|
||||
this.element = $( element );
|
||||
this.options = $.extend( true, {},
|
||||
this.options,
|
||||
$.metadata && $.metadata.get( element )[ this.widgetName ],
|
||||
|
Loading…
Reference in New Issue
Block a user