-
Notifications
You must be signed in to change notification settings - Fork 9
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 to reinitialize donutty #1
Labels
question
Further information is requested
Comments
hey :) Usually a question of this sort will be answered faster on Stack Overflow, but here; If you're using it with jQuery; $("[data-donutty]").donutty(); and this should use all your data attributes for config. If you're using with vanilla; var $donuts = document.querySelectorAll( "[data-donutty]" );
Array.prototype.forEach.call( $donuts , function( $el ) {
var options = JSON.parse( JSON.stringify( $el.dataset ) ),
instance = new Donutty( $el, options );
$el.dataset.donutty = instance;
}); these are both referenced from the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
... on ajax loaded page? I'm using it with data attributes.
The text was updated successfully, but these errors were encountered: