Sorry if this is a repeat but couldnt find anything the same ish...
I can't get the if else statement to work. I get the first part done but the second won't. The aim is to click on a div and it expands, then when clicked again it shrinks.
$(document).ready(function(){
if($(".back2").css("height") < "51px")
{
$(".back2").click(function()
{
$(".back2_img,.back2").css({"height":"200px"}, 'slow');
});
}
ElseIf($(".back2").css("height") >"55px")
{
$(".back2").click(function()
{
$(".back2,.back2_img").css({"height":"50px"}, 'slow');
});
};
});