tags:

views:

18

answers:

1

i am using protoype and i want to get the div wid id='div_3' and display='none' means in a single line i want to find the element wid these two attribs

+1  A: 

The id attribute already uniquely defines an element (assuming your markup is valid). So, all you need to do is select the element with id div_3 - and then worry about its display CSS property, if you need to:

var $myDiv = $('div_3');
if($myDiv.getStyle('display')) {
    // do something
}
Matt Ball