Hey everyone, I have a problem that I hope you can help with!
let imageHeight = $("#slider > Img").height();
let imageFloat = (imageHeight + 31 / 2);
alert(imageFloat);
$("#slidernavright").css("marginTop", (imageFloat));
Is there anyone who can spot the issue here? The alert for imageFloat
is returning a value of 15.5, which means that the imageHeight
is not being factored in correctly. The variable imageHeight
is successfully fetching the height of the image, and the margin is functioning as expected - moving the div
tag down by 15.5px. As someone unfamiliar with jQuery, I suspect this might be a syntax-related problem.