Comments (5)
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
from mixitup.
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
from mixitup.
Hey Patrick
thanks for the reply!
What I meant is that when setting data properties using jQuery's data
function, mixitup doesn't recognize it. The data
function stores data in a jQuery-internal object and does not modify the element's DOM attributes, so the stored data is not accessible through the attr
function.
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 attr
function to access data-* attributes throughout, it doesn't work with data set with the data
function.
Best regards
Max
from mixitup.
So is there a work around for this? Or is it not possible?
from mixitup.
The workaround is to use actual "data-*" attributes instead of the data()
function. But I haven't used in a while. This is just as far as I remember.
Basically you have to do this
$('#myListItem').attr('data-wizardlevel', 100);
instead of
$('#myListItem').data('wizardlevel', 100);
from mixitup.
Related Issues (20)
- Sorting and Filtering causes duplicate content
- Update mixer pagination limit on window resize with mixer.configure() HOT 1
- Mix runs 4 times on page load.
- Pagination scrolling issue with CSS property `scroll-behavior` set on `:root`
- Combining multi filter and pagination with url filtering unsecsessful
- how to filter by attribute, not by class? HOT 1
- Reset button + toggle problems with WEBFLOW integration
- Switching from one filter to second one with less items makes some items overshoot their position HOT 3
- .
- Website & Documentation 404'ing.
- mixer became busy after first filtration HOT 2
- Accessible pagination
- Reset the tabindex on pagination change
- MixItUp Pagination not working with Vite JS
- Invalid certificate on official library website HOT 2
- Uncaught TypeError: t.className.match is not a function
- mixitup related issue
- Since mixitup is dead, what alternative should be look at?
- How can I prevent two Mixitup3 Multifilter instances from controlling one another?
- Bring back the docs?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mixitup.