Hello .. Good night. I’m having the same problem as our colleague. When I click on a variant the site takes me down for no reason. I’ve tried everything, change photo format, take description, put description, but nothing worked. I do not know what else to do. I use Brooklyn too. I am willing to resolve this issue at any time, thanks for listening.
I have the same problem, as I guess many others do. Very strange that “jump down” is an acceptable feature of the Brooklyn theme. Did you pay for the solution or is it something you will share?
Open timber.css and search for “hide”, you will find a rule that assigns
display: none;
to the “hide” class. Now change “display:none;” to:
width: 0;
Vola, it should work now!
Methodology:
I went deep through the js code and realized when you click on a variant image it adds a “hide” class to the images that are not showing and removes the hide class from the new image, and in timber.css in my case the “hide” class has a property
display : none;
which basically makes the object disappear from the viewport that’s why browser jumps down, because for couple of milliseconds there is nothing there to show.
What I did to solve the problem doesn’t actually solve it, its a way to get around that issue, its to put
width : 0;
in the class “hide” instead of “display : none”. It essentially makes the image invisible while keeping the same height and thus the page wont jump down.
Let me know if you need anything else and if the solution worked for you.
Hello everyone, this is really a problem with the Brooklyn theme with the hide class of the first element, it happens when clicking on a different image from the first one, scrolling and clicking on the first thumbnail.
Here I have a solution that although it is not perfect, it allows to reduce the problem:
Add to the bottom of your theme.js file:
$(“.product-single__thumbnail”).click(function(){return $(“html, body”).animate({scrollTop:150},600),!1});