Microsoft
Software
Hardware
Network
Question : how to determine style.display value
I've got a problem. I have a style and html as follows:
.hideMe {display:none;}
:
<tr id="myId" onclick="doThis('myId') class=hideMe> .... </tr>
My doThis() function is supposed to determine the current state of the display attribute and switch it back and forth. The problem is, the elements display attribute value is initially empty, so I can't tell whether it is "none" or whatever the 1st time.
How can I figure this out?
Answer : how to determine style.display value
see if the class equals "hideMe"
function doThis( el )
{
el =document.getElementById(e
l);
if( el )
{
el.className = el.className.indexOf('hide
Me') ==-1 ? el.className + " hideMe" : el.className.replace("hide
Me","");
}
}
Random Solutions
why appendTo jquery is not working
Blank characters being inserted into SQL Table via ADODB
differences between windows server 2003 and windows server 2003 r2
PHP Web publishing in FileMaker Pro 10 Server Advanced
How to Make a RSS feed by using Silverlight 4 and Expression Blend 3?
Intelligent Filter want to know which mails were blocked
SQL 2008 does not send email
New email accounts don't show up in Global List
conditional formatting and or statement
Dell Powerconnect switch 3524/48P PC/IP phones daisy chaining Vlan setup