I know there is the visible() function in prototype. I cant use it though since it only checks for the inline style display:none. How can I check if an element is visible by looking at its CSS?
Thanks!
I know there is the visible() function in prototype. I cant use it though since it only checks for the inline style display:none. How can I check if an element is visible by looking at its CSS?
Thanks!
Maybe the prototype getStyle function is what you are looking for, even though it got some limitations. JQuery got the .css() method as meantioned in the answer to this question.
The method visible()
is working correct only for inline styles. Try instead:
$('your_element_id').getStyle('display')=='none'?0:1
to check if your element is visible or not.
Domus71