JavaScript Isotope- How to manage dynamic data set (re-initialize Isotope)

若如初见. 提交于 2019-12-11 07:27:49

问题


I want to design a website which shows the simple search results with Isotope appearance. I have a text input and get the query from the user and retrieve the search results from my server. So, by changing the query, my data and filtering options change. I don't know how to manage this dynamic data with Isotope.

After each query and data change, when I set the new isotope properties and filters in $container.isotope, the data blocks become invisible and Isotope functions, like animation and filtering, didn't work anymore.

Does anybody know how to manage dynamic data set with Isotope? And how to re-set (re-initialize) Isotope settings after changing of the data set (data blocks)?

Thanks in advance.


回答1:


I found the answer myself! We can use insert and remove function of Isotope. http://isotope.metafizzy.co/docs/adding-items.html



来源:https://stackoverflow.com/questions/14847381/javascript-isotope-how-to-manage-dynamic-data-set-re-initialize-isotope

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!