javascript - jQuery Tables, Clickable Dropdown - multiple hidden rows? -


good day programmers,

being amateur, hunted around , found created nice jquery drop-down table. found terrific one...

$("#report tr:odd").addclass("odd"); $("#report tr:not(.odd)").hide(); $("#report tr:first-child").show(); $("#report tr.odd").click(function(){     $(this).next("tr").toggle();     $(this).find(".arrow").toggleclass("up"); }); 

and css...

#report { border-collapse:collapse;} #report h4 { margin:0px; padding:0px;} #report img { float:left;} #report ul { margin:10px 0 10px 40px; padding:0px;} #report th { background:#222222 url(header_bkg.png) repeat-x scroll center left; color:#fff; padding:3px 8px; text-align:center;} #report td { background:#111111 none repeat-x scroll top left; color:#000; padding:3px 8px; text-align:center;} #report tr.odd td { background:#000000 url(row_bkg.png) repeat-x scroll center left; cursor:pointer;} #report div.arrow { background:transparent url(arrows.png) no-repeat scroll 0px -16px; width:16px; height:16px; display:block;} #report div.up { background-position:0px 0px;} 

by itself, works fine... can see gaming page use on @ following link: http://www.mynextbit.com/pages/wreckedified/roster.html

i'm trying figure out way make drop down maybe 12 or rows instead of 1 show bunch of data 1 of characters in table. did digging , thought re-write jquery using

nth-child(12n+0) 

but couldn't quite pull off. on right track @ least or there more obvious , simple solution?

have considered might possible start new table within rows can keep existing functionality?

right html looks bit this:

<table> <thead>     <th>character</th><th>ilevel</th><th>and other columns...</th> </thead> <tbody>     <tr>         <td>charactername (build)</td><td>559</td><td>other column data...</td>     </tr>     <tr>         <td>this hidden data row</td>     </tr> </tbody> </table> 

instead of trying alter script hides/shows next 12 <tr> tags create new table inside hidden data row...

<table> <thead>     <th>character</th><th>ilevel</th><th>and other columns...</th> </thead> <tbody>     <tr>         <td>charactername (build)</td><td>559</td><td>other column data...</td>     </tr>     <tr>         <td>             <table>                 <tr><td>hidden data row 1</td></tr>                 <tr><td>hidden data row 2</td></tr>                 <tr><td>hidden data row 3</td></tr>                 <tr><td>hidden data row 4</td></tr>                 <tr><td>hidden data row 5</td></tr>                 <tr><td>hidden data row 6</td></tr>                 <tr><td>hidden data row 7</td></tr>                 <tr><td>hidden data row 8</td></tr>                 <tr><td>hidden data row 9</td></tr>                 <tr><td>hidden data row 10</td></tr>                 <tr><td>hidden data row 11</td></tr>                 <tr><td>hidden data row 12</td></tr>             </table>         </td>     </tr> </tbody> </table> 

but table "oldschool" if draw picture of want display might able give alternative ways too.


Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -