Permalink
Browse files

Replace element.data(...) with $.data(element, ...). Fixes #5756 - Wi…

…dget: Use $.data instead of .data for performance reasons
  • Loading branch information...
jzaefferer committed Jul 30, 2010
1 parent 39f0c10 commit b3940d2f78dfcc37792ceb97e5659b78f156794c
Showing with 2 additions and 1 deletion.
  1. +2 −1 ui/jquery.ui.widget.js
View
@@ -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 ],

0 comments on commit b3940d2

Please sign in to comment.