geeky · non php code · plug

jQuery and Tamper data rock

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.

3 thoughts on “jQuery and Tamper data rock

  1. 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.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s