Jump to content
JIHAD

jquery resizble cell row span

Recommended Posts

Posted

Salut,

Stie cineva cum pot sa schimb atributul rowspan in tabelul de mai jos, folosing jquery.

<!DOCTYPE html>
<html>
<head>
<style>
table, th, td {
border: 1px solid black;
}
</style>
</head>
<body>

<table>
<tr>
<th>Month</th>
<th>Savings</th>
<th>Savings for holiday!</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
<td rowspan="2">$50</td>
</tr>
<tr>
<td>February</td>
<td>$80</td>
</tr>
<tr>
<td>March</td>
<td>$180</td>
<td>$60</td>
</tr>
</table>

</body>
</html>

Vreau sa fac resize cu drag&drop, trag de border in sus, micsoreaza, in jos mareste atributul rowspan pentru td-ul respectiv.

Posted (edited)
$( "table" ).attr( "moloz", "altceva" ); sau addclass sa aduagi clasa.

Numai c? tu modifici la <table> ?i el vrea la <td> respectiv.

$('table tr td').attr('rowspan', 'valoare');

nop. se modific? la toate..

Edited by EAdrian

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...