Link to home
Start Free TrialLog in
Avatar of bcv2010
bcv2010

asked on

mootool : remove css attribute

hi,
I am using mootool and  i have the following css

#social_wrapper {
      z-index: 10;
      position: absolute;
      top: 27px;
      right: 0;
      visibility: hidden;
}

and i want to remove the visibility when onclick
Avatar of Snarfles
Snarfles
Flag of Australia image

Is it not a case of simply removing the line?

or change it to

visibility: visible;

If not I dont understand the question.
#social_wrapper {
      z-index: 10;
      position: absolute;
      top: 27px;
      right: 0;
}

Open in new window

Add this to your onclick javascript in the element in question:
onclick = "this.style.visibility = 'hidden';"

I Can't help to mention tho, what are you trying to achieve?  visibility still leaves the space there just can't see it.

Most of the time I will use display = none.  This will removed the entire element from the page.  So it would look like this:

onclick = "this.style.display = 'none';"

also if it's not the clicked element you want to go away you'll need to use this:
onclick = "document.getElementById('<element name>').style.display = 'none';"
Avatar of bcv2010
bcv2010

ASKER

sorry. suppose the script should use mootool to remove the css attribute.. i have done that in JQuery but unfortunately the site i am wrking on is using mootool...  

bsically i want to hide the div having id =social_wrapper. Onload page it will hide the panel havng id=social_wrapper . when onclik [ in mootool it is click function () ....   ] ....

hope this clarify the question
ASKER CERTIFIED SOLUTION
Avatar of CCSOFlag
CCSOFlag
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bcv2010

ASKER

don;t have time to test on the solutions, therefore accept it as the reference