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

fire "change" event after loading color from localStorage #35

Open
harthur opened this issue Sep 11, 2012 · 3 comments
Open

fire "change" event after loading color from localStorage #35

harthur opened this issue Sep 11, 2012 · 3 comments

Comments

@harthur
Copy link

harthur commented Sep 11, 2012

My program is changing the background color of an element based on the color selected by the picker. I keep them in sync by listening to the "change" event of the picker.

Right now the "change" event isn't fired after loading in the saved value from localStorage. It would be nice to do that so that I don't have to manually fetch the initial value after loading and duplicate the code from the "change" listener.

@bgrins
Copy link
Owner

bgrins commented Sep 11, 2012

Just to be clear, are you saying that once you click on the palette entry from localStorage that it isn't firing change? Or that you would like it to remember the most recently selected color when initializing if the localStorageKey option is set?

If I am still misunderstanding, can you fork this jsfiddle and show a small example of what you are experiencing? http://jsfiddle.net/kHTp5/

@harthur
Copy link
Author

harthur commented Oct 4, 2012

Ah yes, sorry, this is using localStorageKey. I can't get seem to get it working with the jsFiddle.

@bgrins
Copy link
Owner

bgrins commented Jan 24, 2013

@harthur Let me know if this is still an issue for you. I'll do my best to get it resolved.

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