...

View Full Version : Resolved Hide div on click



Xellic
11-22-2012, 12:58 AM
Basically all I want is to hide a position:fixed; div box when I click it.

I've tried a few things that I read online but none of them seem to work. Anyone know how to do this?

abduraooft
11-22-2012, 07:14 AM
Add an attribute
onclick="this.display='none'" on it.

Xellic
11-22-2012, 02:04 PM
Add an attribute
onclick="this.display='none'" on it.

This does not seem to work.

Xellic
11-22-2012, 02:14 PM
Nevermind, I figured it out. To anyone who wanted to know it's:


<div onclick="this.style.visibility='hidden'"></div>

VIPStephan
11-22-2012, 02:46 PM
Well, yeah. Likewise you would do this.style.display='none'. abduraooft just forgot the “style”.

abduraooft
11-22-2012, 03:36 PM
Oops... :-(



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum