Looking to create responsive blocks using jQuery. I have two cube blocks with different widths. After writing a few lines of code to make them responsive, the second block now takes the height of the first div
and changes on resize. Check out this example to see the issue when resizing the window width.
I was hoping for the different cubes to resize independently and maintain their cube shape.
Here is the code snippet:
function cube(){
var divWidth = $('.cube').width();
$('.cube').height(divWidth);
}