Stop animation on touch device.
The red frame part of the attached image.
Can I stop the animation with a touch device?
Stop animation on touch device.
The red frame part of the attached image.
Can I stop the animation with a touch device?
Hello There,
Thanks for writing in! The animation of the CTA button is controlled by hover events. In touch devices, the hover event is translated into touch start, tap and touch end. Disabling the animation would mean to modify the JS script. Please add this JS code in the Theme Options > Global JS (http://prntscr.com/evswzb) or in the customizer, Appearance > Customize > Custom > Edit GLOBAL Javascript
(function($){
$('.x-creative-cta').each(function(){
$(this).on('touchstart',function(e){
$(this).trigger('click');
e.preventDefault();
});
});
})(jQuery);
Please let us know how it goes.
Thank you.
The animation has stopped but it is not possible to link.
I want to be able to link only.
Hello There,
You may need to update the code and make use of this instead:
(function($){
$('.x-creative-cta').each(function(){
$(this).on('touchstart',function(e){
$(this).trigger('click');
});
});
})(jQuery);
Hope this helps. Kindly let us know.
Links are now available.
But the animation will move.
Hi again,
You can remove the previous code and add the following code in your Customizer via Appearance > Customize > Custom > Edit Global CSS:
.touchevents .x-creative-cta.slide-top>span.text {
transform: none !important;
opacity: 1 !important;
}
.touchevents .x-creative-cta>span.graphic {
display: none !important;
}
Let us know how this goes!
Thank you!
solved.
Glad we could help.
Cheers!