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
how to get data in UTF-8 mode from database?
Script to mount drives on boot or via a script file
procedure for installing Exchange 2007 SP3 on CCR
MySQL Admin Login
Adding 2nd DHCP server
Insert Item to ContextMenuStrip ?
Cannot access voicemail on Exchange 2010 from OCS 2007R2. Failure Type 80004005
Addiing unallocated disk space to an aray
Error message on log on with windows.
Exporting kernel memory to user space using devmap_umem_setup