This is my div
Then I have a Show button that will show the div when you click:
Try checking for the :visible property instead.
if($('#car2').not(':visible')) { alert('car 2 is hidden'); }