Answer the question
In order to leave comments, you need to log in
Why does the onclick event stop working when the screen orientation changes?
Hello! There is a slick slider in which a carousel reviews (a standard situation). To reduce the size, I found a script that collapses a div (readmore.js was wildly furious with it, I found some kind of super simple script in general - but that's not the point)
So. When swiping on a slick, there is a function that makes the scrolltop to the top of the review, and collapses the divs with the text. It is framed through the standard slickslider handler
$('.wtwp-testimonials-slidelist-1').on('swipe', function(event, slick, direction) {});
Answer the question
In order to leave comments, you need to log in
And this is what it all turned out to be. slick slider in the wp-testimonial-slider plugin was called with additional responsive arguments [...]
I understand that when the breakpoint is overcome, these page elements are removed and re-added. jquery can no longer find the old ones, and therefore the script is skipped. Well, in general, I still haven’t fully understood the logic, but by removing the adaptability, everything worked.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question