0

Hi,

I have to add css attribute at runtime using jquery..
For example i have the following code:

<table width='100%' cellpadding='0'  cellspacing='0' >
    <tr>
      <td valign='top' width='70%'><span class='header-text'> </span> </td>
    </tr>
  </table>

I need to add css style to the table. I can access span element of td within table. From that how do i get table element.

Help immediately required.

Thanks,
VC

3
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by VenusCrystal
0

i think
$(this).find('table');
or you could give your table a class/id and get it like this
$('.tableClass'); or $('#tableID');

0

Or you could try something like this.

$("table").css({'background-color': '#ffe', 'border-left': '5px solid #ccc'})
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.