JAVASCRIPT 29
Js load listener By micha on 11th November 2022 07:37:29 AM
  1. /*
  2. The load event is fired when the whole page has loaded, including all dependent resources such as stylesheets and images. This is in contrast to DOMContentLoaded, which is fired as soon as the page DOM has been loaded, without waiting for resources to finish loading.
  3.  
  4. Ref: https://developer.mozilla.org/en-US/docs/Web/API/Window/load_event
  5. */
  6.  
  7. <script type="text/javascript">
  8. document.querySelector('#ucblock').addEventListener('load', function() {
  9.   ucloaded();
  10. });
  11.  
  12. function ucloaded() {
  13.   console.log('loaded');
  14.   $('.uc-embedding-more-info').click(function() {
  15.         console.log('click');
  16.   });
  17. }
  18. </script>

Paste is for source code and general debugging text.

Login or Register to edit, delete and keep track of your pastes and more.

Raw Paste

Login or Register to edit or fork this paste. It's free.