I'm writing an if/else statement which I've simplified to the fiddle link below. Basically I check for the value of a CSS attribute, and if it's one specific value then I want one thing to happen, and if it's a different value (nonspecific, just any other value), then I want another thing to happen.
$(document).ready(function (){
if($(".header-wrapper").css("height") == "100px"){
alert("true");
}
else{
alert("false");
}
$(".below").click(function(){
$(".header-wrapper").css("height", "200px");
});
});
But for some reason my code checks the CSS value once and doesn't do anything if the CSS value changes, and I want to trigger this event every time the CSS value changes to and from the specific value. Thanks for the help in advance.