Snugug / eq.js

Lightweight JavaScript powered element queries
http://eqjs.io/
MIT License
527 stars 34 forks source link

Queries doesnt work when container width changed #58

Closed lasekio closed 9 years ago

jacobjuul commented 9 years ago

https://github.com/Snugug/eq.js/pull/61 does this solve your issue?

Snugug commented 9 years ago

They never have, by design.

This script very consciously does not and will not attempt to recalculate element queries on all DOM changes as that is very likely to result in a never-ending rabbit hole of craziness.

Running eq.js every time a container width changes is A) terrible for performance and B) likely to lead to infinite loop issues, one of the main things holding it back from browser implementation. Instead, eq.js [provides[(https://github.com/Snugug/eq.js#usage) eqjs.query(nodes) to allow you to recalculate and reapply the querying when you know want.