Bug Tracker

Changeset 5493

Show
Ignore:
Timestamp:
05/07/08 16:25:12 (7 months ago)
Author:
scott.gonzalez
Message:

$.widget: Updated default destroy method to remove the instance data.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/ui/ui.core.js

    r5484 r5493  
    8888    var widgetPrototype = { 
    8989        init: function() {}, 
    90         destroy: function() {}, 
     90        destroy: function() { 
     91            this.element.removeData(this.widgetName); 
     92        }, 
    9193         
    9294        getData: function(key) { 
     
    131133        $[namespace][name] = function(element, options) { 
    132134            var self = this; 
     135             
     136            this.widgetName = name; 
    133137             
    134138            this.options = $.extend({}, $[namespace][name].defaults, options);