Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do we use the new cookies option? #1

Open
Webdaddy opened this issue Nov 11, 2012 · 3 comments
Open

How do we use the new cookies option? #1

Webdaddy opened this issue Nov 11, 2012 · 3 comments

Comments

@Webdaddy
Copy link

How do we implement the new cookies option? Will we need to specify a cookie for each accordion instance?

BIG thanks for this mod!

@messutied
Copy link
Owner

Hi, you just have to pass the options: {cookies: true}

@Webdaddy
Copy link
Author

I've used the syntax specified by Anas Nakawa to implement your cookie option as follows:

$('#multiAccordion').multiAccordion({active: ['ALL'] });
$('#multiAccordion').multiAccordion({cookies: true});

$('#generalSettings').multiAccordion({active: ['ALL'] });
$('#generalSettings').multiAccordion({cookies: true});

Firebug confirms that the cookies have been created, but the index numbers don't appear to be set for each cookie:

mAcc_generalSettings [0,1,2,3]
mAcc_multiAccordion [4,5,6,7,8,9]

I thought the original spec relied on the index starting at 0 for each instance.

Nor do they appear to override the "active" options set above. Do I have to alter them in some way to reflect the index values in the cookies?

An page with a working example would be most appreciated!

@Webdaddy
Copy link
Author

My bad, the cookies are indeed being set for each unique id name, but the index doesn't begin at '0' for any of them. Am I missing something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants