View Full Version : Remove a cell with class

05-26-2009, 12:36 PM

I'd like to make a Greasemonkey script that removes the left table from sites running geeklog. This (http://uskojarukous.net/phpBB2/) is the particular site I have in mind.

What I need to do is simply to remove a td classed "block-feature-left".

I've tried this with no luck:

var elements = document.getElementsByClassName("block-featured-left");

Thank you for the answers and sorry for being such a newbie :-)

05-26-2009, 01:18 PM
Found it out myself. :-)

This works:

var elements = document.getElementsByClassName("block-featured-left");
elements[0].style.display = "none";

05-26-2009, 01:27 PM
side note: getElementsByClassName() is not implemented in older browsers, so you may need to attach a custom one, see http://www.codingforums.com/showthread.php?t=154727

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum