I’ve been working on a UI design at work and some of the build in components have border=”1″ on their generated table code. To achieve a consistent look, I always want border=”0″ on the table so I can control the table border with CSS. There is no way as far as I know you can get rid of the table border with CSS once the source have border=”1″ in the table tag. But you can get rid of all table borders with this single line of code in jQuery:
$("table[border!='0']").attr("border", "0");
It completely rules!!
While debugging, I also found this awesome Firefox plugin: Tamper data. It lets you hijack a post/get http request on the fly so you can view and modify the submitted parameters. I used to use WebScarab. But this is so much lighter weight. Although it only works in Firefox while WebScarab, a proxy server, would work with any browsers.
I use this technique when I want to manipulate the html ( move stuff around, fix structure, etc. )
Just fire up firebug, use a jQuery bookmarklet, make changes Firebug w/ jQuery, then save the generated code when done.
You can also use Firebug to tamper w/ data, just select the form elements and change the values.
The same for mootools
$$('table').set('border', '0');
That is the long way of saying this:
$(“table”).attr(“border”, “0”);