We're Moving to a New Support Platform – Starting June 1st!
We’re excited to let you know that starting June 1st, we’ll be transitioning to a new support system that will be available directly on our product websites – Amelia, wpDataTables, and Report Builder. In fact, the new support platform is already live for Amelia and wpDataTables, and we encourage you to reach out to us there.
You'll always be able to reach us through a widget in the bottom right corner of each website, where you can ask questions, report issues, or simply get assistance.
While we still do not offer live support, a new advanced, AI-powered assistant, trained on our documentation, use cases, and real conversations with our team, is there to help with basic to intermediate questions in no time.
We're doing our best to make this transition smooth and hassle-free. After June 1st, this current support website will redirect you to the new "Contact Us" pages on our product sites.
Thanks for your continued support and trust – we’re excited to bring you an even better support experience!
I am unable to catch the javascript "select" event of datatables.js
i.e. (https://datatables.net/reference/event/select)
I am trying to insert the code into your "Custom wpDataTables JS" section.
By the way, the 'order' event does work but is not the event I need.
I am using the following code:
jQuery(window).load(function(){
//wpDataTables.table_1.addOnDrawCallback(function(){alert('Callback triggered!');});
var table = jQuery('#table_1').DataTable();
table.on( 'select', function ( e, dt, type, indexes ) {
alert( 'Table select ran!' );
if ( type === 'row' ) {
var data = table.rows( indexes ).data().pluck( 'id' );
// do something with the ID of the selected items
alert(id);
}
});
});
This seems to work, it is different to the datatables.net advice but it works:
(I placed it once in the correct page as a snippet, if placed in the wp data tables custom JS section, it is inserted for every single table)
jQuery(window).load(function(){
var table = jQuery('#table_1').DataTable();
jQuery('#table_1 tbody').on('click', 'tr', function () {
var data = table.row( this ).data();
alert(data[0]);
});
});
Hi Duncan,
Thank you for your purchase.
I am glad that you found a solution.
Previous code is not working because we override that event, and we made custom clickEvent function for our needs.
Kind Regards,
Isidora Markovic
wpDataTables: FAQ | Facebook | Twitter | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Amelia demo sites | Docs
You can try our wpDataTables add-ons before purchase on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables