Skip to content

Commit

Permalink
Replace element.data(...) with $.data(element, ...). Fixes #5756 - Wi…
Browse files Browse the repository at this point in the history
…dget: Use $.data instead of .data for performance reasons
  • Loading branch information
jzaefferer committed Jul 30, 2010
1 parent 39f0c10 commit b3940d2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ui/jquery.ui.widget.js
Expand Up @@ -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 ],
Expand Down

0 comments on commit b3940d2

Please sign in to comment.