I\'m using isotope ( http://isotope.metafizzy.co ) with expandable items, and i would like to use ScrollTo so that i can automatically scroll to the newly expanded item..>
allright,
sneaking in the isotope code, i found that the animation options are passed directly to the animate jquery method, so i added the complete callback to these options:
animationOptions: {
duration: 4000,
easing: 'easeInOutQuad',
queue: false,
complete: iwannascroll
}
then i was able to filter my expanded object and scroll to it :
function iwannascroll(){
var target = $(this);
if (target.hasClass('expanded'))
$.scrollTo(target, 800);
}
obviously it will work only if you use the jQuery animate method for the animation.. If anyone knows a better and "universal" way, i would love to hear it ;)