-
Notifications
You must be signed in to change notification settings - Fork 735
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
Support dyanmically added data properties #10
Comments
Hi Max - Thank you for the feedback! Our developer is on vacation until June 12th, so any technical issues or requests will experience delay in response. We'll make sure to keep you posted. The MixItUp Team |
Hey Maxkeung, If I understand you correctly, are you requesting that if a data attribute changes after MixItUp has instantiated, MixItUp would re-sort elements accordingly automatically? This should already be possible if you write some custom javascript that runs after you change the data attribute, essentially just firing the sort method. I haven't tested it but i'm pretty sure it would work. If I've misunderstood you, please clarify! Thanks for the feedback, Patrick |
Hey Patrick thanks for the reply! What I meant is that when setting data properties using jQuery's Consider this: var bdy = $('body');
bdy.data('magic', 'unicorns');
console.log(bdy.attr('data-magic')); // undefined (or null) At the same time: var bdy = $('body');
bdy.attr('data-magic', 'unicorns');
console.log(bdy.data('magic')); // unicorns Because mixitup uses the Best regards |
So is there a work around for this? Or is it not possible? |
The workaround is to use actual "data-*" attributes instead of the Basically you have to do this $('#myListItem').attr('data-wizardlevel', 100); instead of $('#myListItem').data('wizardlevel', 100); |
Hello
it would be really nice if mixitup would also support dynamically added data properties using the
$.data()
method:The text was updated successfully, but these errors were encountered: