Search code examples
jqueryjquery-isotope

itemPositionDataEnabled in jquery isotope v2.1


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?


Solution

  • 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);