1
I have a project in progress and I use the Adminlte for layout. I liked it a lot, but I have a doubt about Datatable: How to apply functions to select a line in Datatable?
I’ve tried applying several tips like:
$('#example2 tbody').on( 'click', 'tr', function ()
{
if ( $(this).hasClass('selected') ) {
$(this).removeClass('selected');
}
else {
table.$('tr.selected').removeClass('selected');
$(this).addClass('selected');
}
});
But nothing works out.
Someone can?
Thanks in advance
Your error may be in html as well.. Post the code for ease
– Anderson Henrique
Opa Anderson! Thank you so much for the interaction. I tried to send the HTML code but it was not possible, here. There is another method?
– Richardson Lourenço
Just edit your question and paste it, then select and click to organize as code, has a key design { }
– Anderson Henrique
Not allowed! Specifies character limit! But I think it’s not HTML, because when I change link that points to CSS and JS, which comes in the folders of ADMINLTE, for those I found on the site Datatables.Net, run. It’s as if the Board doesn’t have support
– Richardson Lourenço
It has yes, I’ve used it enough times, tell me what you want? Change the color from the selection?
– Anderson Henrique
What beautiful news! What I want to do, and mark the line with a color, when the user clicks on it in Datatable. This to be able to catch the line that is marked and edit it later (CRUD)
– Richardson Lourenço