Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

151
Views
How do you listen to jquery datatable event after updates and not before

I'd like to update dom elements after the default datatable updates are completed, such as searching and sorting. The problem is the following event listening fires before the actual sort or search: I want my code to execute after the sort or search is completed. Thank you.

 $('#dTable').DataTable({
        "numbering": false,
        "searching": true,
        "paging": true,
        "ordering": true,
        "bLengthChange": false,
        'iDisplayLength': 10,
        "info": false,
        "scrollCollapse": true,
      
    }).on('draw', function () {

        //my dom update code -- problem is my update code executes before the sort or search is completed; 
      //i want my code to execute only after its completed

           $(".dom_element").html("sort or search completed");
    });
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

figured it out!!

$('#dTable').DataTable({
    "numbering": false,
    "searching": true,
    "paging": true,
    "ordering": true,
    "bLengthChange": false,
    'iDisplayLength': 10,
    "info": false,
    "scrollCollapse": true,
 
    "fnDrawCallback": function () {
          
            //write dom update code here...

            return false;
        }

 })
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!