tilt.js
tilt.js copied to clipboard
Destroy and other methods dont seem to work
Hi so basically i have a Polaroid collage with slightly rotated images. I would like to initiate tilt on mouse over and destroy it on mouse out. But i would like it to stay in the original rotated position at all times. But when you hover over the image it straightens out. Is there a way to stop this from happening? I ended up just using a mouse out event and removed those styles but why wont the destroy do that. I removed my mouse out event so that you can see what happens with out it.
avid7.com/test/ is the domain that it is on
Hey @TheNewGuy16 - I had a similar issue. You can use this to destroy the Tilt instance:
var element = $(this).closest('.js-parent').find('.js-tilt'); element.tilt.destroy.call(element);
Just change the "element" to point to your element.
I'd look into changing the options on mouse scroll and mouse over. Reset: false would be the way to modify the instance on whatever event you'd like it to activate upon.
$('.column-grid').tilt({ reset: false });