I am trying to find find out whats the jQuery equivalent of
style.display.indexOf('none') > -1)
I tried
if(jQuery('#container').css(display).index(none) > -1)
But i am not sure if its right, can anyone give me a hand
Thanks
Assuming that objective is to determine if the display property is set to none:
jQuery('#container').css("display") === "none"
^^^ Needs to be a string
^^^ Should be an equality operator
You are not enclosing the string in ''
if(jQuery('#container').css('display').index('none') > -1)
but is you are looking for whether the element is displayed then use the :visible selector
if(jQuery('#container').is(':visible'))
nonewithout quotes in the second string?.cssworks: api.jquery.com/css/#css1.