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

Add a way to trigger updates from site JS #41

Open
jefferyto opened this issue Jan 28, 2014 · 4 comments
Open

Add a way to trigger updates from site JS #41

jefferyto opened this issue Jan 28, 2014 · 4 comments

Comments

@jefferyto
Copy link
Collaborator

Folks are using this with elements that are styled dynamically with JS (#31, #15 (comment), #32 (comment)), so we need a way for site scripts to trigger an update after they're done styling.

@jefferyto
Copy link
Collaborator Author

Until this is done, a workaround is to "touch" the element, i.e. assign to any property of the DOM object (it doesn't matter if the property value remains unchanged).

For example, if the elements that use the polyfill all <div class="bg">, then this should cause an update:

$('div.bg').prop('class', 'bg');

@rubensayshi
Copy link

$('div.bg').get(0).style.behavior = $('div.bg').get(0).style.behavior;

does the trick

@jefferyto
Copy link
Collaborator Author

Thanks @rubensayshi - as I said, a workaround is to assign any value (even the same value) to any property.

@leup
Copy link

leup commented Apr 29, 2014

👍

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

No branches or pull requests

3 participants