itemPositionDataEnabled in jquery isotope v2.1

自闭症网瘾萝莉.ら 提交于 2019-12-11 22:35:35

问题


I just upgraded my isotope script to 2.1, but now the option itemPositionDataEnabled seems to not have any effect anymore. The data("isotope-item-position") just returns undefined now.

Here is the original documentation for the v1 script: http://isotope.metafizzy.co/v1/docs/options.html#itempositiondataenabled

Any Ideas anyone?


回答1:


you can try to get the position with position jquery method or offset

var p = $( "#element" );
var position = p.position();
alert( position.left + "," + position.top);



回答2:


From Isotope v2 docs:

itemPositionDataEnabled option removed. Item position is now accessible as it is set with left and top.

Changes from v1 of isotope



来源:https://stackoverflow.com/questions/27173587/itempositiondataenabled-in-jquery-isotope-v2-1

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