Skip to content
This repository was archived by the owner on Nov 15, 2017. It is now read-only.

add default options#18

Closed
zfben wants to merge 6 commits intocarhartl:masterfrom
zfben:master
Closed

add default options#18
zfben wants to merge 6 commits intocarhartl:masterfrom
zfben:master

Conversation

@zfben
Copy link

@zfben zfben commented Jul 7, 2011

set with jQuery.cookie.defaults

jquery.cookie.js Outdated
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like creating a global i here.

@carhartl
Copy link
Owner

carhartl commented Jul 8, 2011

Instead of

var defaults = {};
for( i in jQuery.cookie.defaults ){
    defaults[i] = jQuery.cookie.defaults[i];
}
options = jQuery.extend(defaults, options);

we can probably write less:

options = jQuery.extend({}, jQuery.cookie.defaults, options);

@zfben
Copy link
Author

zfben commented Jul 8, 2011

I have change these code, now looks better, thx

@carhartl
Copy link
Owner

carhartl commented Jul 7, 2012

Now obsolete with f43512e

@carhartl carhartl closed this Jul 7, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants