How do I add parameter when I have to use var table = for an option
How do I add parameter when I have to use var table = for an option
nander
Posts: 13Questions: 6Answers: 0
How do I add parameter when I have to use var table = for an option but the other options done need it Ex:
$(document).ready(function () {
var table = $('#example').DataTable(
{ language: {
searchPlaceholder: "Search records",
search: ""},
fixedHeader: true,
// Enable the vertical scrolling
// of data in DataTable to 200px
scrollY: '600',
scroller: true,
lengthMenu: [ [50, 100, 150, -1], [50, 100, 150, "All"] ],
$('#example tbody').on('click', 'tr', function () {
if ($(this).hasClass('selected')) {
$(this).removeClass('selected');
} else {
table.$('tr.selected').removeClass('selected');
$(this).addClass('selected');
}
});
$('#button').click(function () {
table.row('.selected').remove().draw(false);
});
});
Edited by Kevin: Syntax highlighting. Details on how to highlight code using markdown can be found in this guide
Answers
Sorry, I'm not clear what you are asking for. Please provide more details.
Kevin