-4

I am in need of some JS assistance.

I need to run some code after the DOM was updated.

For example: when I click a button, it fires a function. I need to run that function code and when the DOM is fully updated, run some more code. How could I go about doing this in a clean fashion?

I am sure this is relatively simple but I am drawing blanks. I am using jQuery.

$('.btn').click(function() {
    do some stuff

   // then ensure dom has fully updated and do some more????
})

1 Answers1

0

DOM updates are synchronous. Just put the code where your comment is.

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335