RJS page.select DOM element properties

Is there an easy way to check if a certain DOM element is visible using
Select?

This code doesn’t work:

page.select(‘li.class’).each do |item|
if item.style.display == ‘none’

Do something here…

end

end

Thank you for any help.