Ravleen Kaur Ravleen Kaur - 1 year ago 51
Javascript Question

Element is hidden not working with css property

I want to check if an element is hidden but the code below is not working properly.

if ( $(element).css('display') = 'none' ){
// element is hidden

Answer Source

hey in your code you have to put ==

if( $(element).css('display') == 'none' ){


Also you can use