How to convert this little script to Prototype:
Basically, I need to check if an element is visible or not, I do it using jquery as follows: $('id_element').is(':visible');but I don't know how to do this with a prototype.
<div id="myDiv" style="display:none">A Div</div>
<script>
if(document.getElementById('myDiv').style.display == 'none') alert('visible');
else alert('hidden');
</script>
Thank!
source
share