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

A way to read the new sort order #49

Closed
mvrsn opened this issue May 3, 2011 · 2 comments
Closed

A way to read the new sort order #49

mvrsn opened this issue May 3, 2011 · 2 comments

Comments

@mvrsn
Copy link

mvrsn commented May 3, 2011

Currently, as far as I've been able to figure out, there is no good way to do the above. Another value next to the original-order in isotope-sort-data would be convenient, or even a way to loop through the nodes in order.

@desandro
Copy link
Member

desandro commented May 3, 2011

After initializing Isotope, you can retrieve the data from its instance using jQuery's data method with the namespace 'isotope'

$('#container').data('isotope')

For your scenario, the property we're looking for is $filteredAtoms

var $sortedItems = $container.data('isotope').$filteredAtoms;

See http://jsfiddle.net/desandro/JcHcc/ for a good example of how I used this.

@desandro desandro closed this as completed May 3, 2011
@mvrsn
Copy link
Author

mvrsn commented May 4, 2011

Wonderful :)
I failed to see this in the documentation, and it never occured to me to see what data was on the container node.

Thanks for the quick help

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

No branches or pull requests

2 participants