Check div is hidden using jQuery Check div is hidden using jQuery jquery jquery

Check div is hidden using jQuery


You can check the CSS display property:

if ($('#car').css('display') == 'none') {    alert('Car 2 is hidden');}

Here is a demo: http://jsfiddle.net/YjP4K/


Try:

if(!$('#car2').is(':visible')){      alert('car 2 is hidden');       }


Try

if($('#car2').is(':hidden')){      alert('car 2 is hidden');       }