how to remove a div element completely
|
| View previous topic :: View next topic |
| Author |
Message |
montanarry
Joined: 13 May 2006 Posts: 175
|
| how do I remove a <div> element completely? |
| |
|
|
|
|
Koplaf
Joined: 28 May 2006 Posts: 130
|
| foo.removeChild(div); |
| |
|
|
montanarry
Joined: 13 May 2006 Posts: 175
|
| ok, thanks |
| |
|
|
Kopilman
Joined: 25 May 2006 Posts: 162
|
| montanarry, div.parentNode.removeChild(div); might easier to use |
| |
|
|
montanarry
Joined: 13 May 2006 Posts: 175
|
I tried "ddocument.removeChild(document.getElementById('notice'));" but that didn't work =/
-d in the beginning. |
| |
|
|
Kopilman
Joined: 25 May 2006 Posts: 162
|
| montanarry, var div = document.getElementById('notice'); div.parentNode.removeChild(div); |
| |
|
|
|
|