Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Destroy and other methods dont seem to work #43

Open
TheNewGuy16 opened this issue Jan 24, 2018 · 1 comment
Open

Destroy and other methods dont seem to work #43

TheNewGuy16 opened this issue Jan 24, 2018 · 1 comment

Comments

@TheNewGuy16
Copy link

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

@sancarr
Copy link

sancarr commented Jan 22, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants