- This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- The forum ‘JavaScript’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › JavaScript › remove a Class
hi,
hi , i want to remove this tools which i show in below picture with java script From my ning website, i used
document.getElementById(‘xj_message_container’).document.getElementByclass(‘texteditor_toolbar’).style.display=’none’;
removeClass(document.getElementById("xj_message_container"), "texteditor_toolbar")
but it still doesnt work , any idea ?
tnx
<p style="text-align: left;"><img src="http://api.ning.com/files/o3VTA62SVkDDuDa4yN9tBxCIvofztaY2E60Vgwk8zgFwnywc-EAhdEpZE0ZAA41rN778UzK5ng1Yp*Vthjcv5syb7MIB*wXo/toolsremove.jpg" alt=""/></p>
Using raw javascript I came up with this.
window.onload = function() {
var div = document.getElementById('my-div'), div_classes = div.className
div_classes = div_classes.replace(/( )?background( )?/, '');
div.className = div_classes;
}