JIHAD Posted March 17, 2015 Report Posted March 17, 2015 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. Quote
QUADMACHINE Posted March 17, 2015 Report Posted March 17, 2015 Verifica pe aiciColumn & row resize - Handsontable Quote
sclipici Posted March 17, 2015 Report Posted March 17, 2015 $( "table" ).attr( "moloz", "altceva" ); sau addclass sa aduagi clasa. Quote
EAdrian Posted March 17, 2015 Report Posted March 17, 2015 (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 March 17, 2015 by EAdrian Quote
soimuletzu1 Posted March 17, 2015 Report Posted March 17, 2015 (edited) $('table tr td').attr('rowspan', 'valoare');@poate sa adauge o clasa pe acel td si sa se foloseasca de ea ca selector.sau poate sa parcurga toate td-urile si sa returneze doar pe cele cu atributul rowspan.Edit fiddle - JSFiddle Edited March 17, 2015 by soimuletzu1 Quote