Lewis, David schrieb:
> var intervalTracker = new function() {};
> $.fn.updateIfModified = function (options) {
>       // default settings
>       this.defaultSettings = {
>               name: 'noName',
>               url: '/',
>               interval: 5000
>       };
>       
>       // merge the options with the default settings
>       var settings;
>       if (options) {
>               settings = $.extend(this.defaultSettings, options);
>       } else {
>               settings = this.defaultSettings;
>       }
>   
Just a hint, nothing to solve your real problem:
Rename your defaultSettings to settings, that can reduce your 
options/settings/defaults code to this:

// default settings
this.settings = {
        name: 'noName',
        url: '/',
        interval: 5000
};
        
// merge the options with the default settings

if (options) {
        $.extend(this.settings, options);
}

-- Jörn

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to