Created
October 15, 2014 14:17
-
-
Save kaitwalla/ec0dca22edc75a0d6353 to your computer and use it in GitHub Desktop.
DataTables show all fields (including hidden) using jQuery Modal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#dtable tbody').on('click','tr',function() { | |
$(this).addClass('selected'); | |
row = dTable.row('.selected').data(); | |
$('#201314YorkAdamsTeacherSalaries1411419301 .modal table').html(''); | |
for (var i = 0; i < cols.length; i++) { | |
$('<tr><td><strong>'+cols[i]+'</strong></td><td>'+row[i]+'</td></tr>').appendTo('#201314YorkAdamsTeacherSalaries1411419301 .modal table'); | |
} | |
$('#201314YorkAdamsTeacherSalaries1411419301 .modal').modal().on($.modal.BEFORE_CLOSE,function() { | |
$('#201314YorkAdamsTeacherSalaries1411419301 tr.selected').removeClass('selected'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment