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
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
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';"
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('
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
don;t have time to test on the solutions, therefore accept it as the reference
or change it to
visibility: visible;
If not I dont understand the question.
Open in new window