I am trying to stop a .hover action whenever a div changes height.
This is the code I have so far:
if (secondary.height() <= 300) {
secondary.css("height",300);
secondary.hover(function(){
jQuery('.comments-holder').css("height",mediumHeight);
},
function(){
jQuery('.comments-holder').css("height",minHeight);
});
} else {
// DO SOMETHING ELSE
}
The problem I am having is that .hover is being triggered no matter what the if statement implies.