I am looking for something like the $(document).ready function in jQuery, as I work on experimenting with using Closure.
So, my question is simple, is there a function I am missing that will allow me to wait until my function is called when the DOM tree is done?
I use unobtrusive javascript, so the idea of putting any javascript in my html is such a ne开发者_StackOverflow中文版gative, if that is required.
Looks like you're out of luck according to this. Inline script blocks appears to be your only choice.
If you want to do it your way (instead of Google's way), perhaps this would work for you.
Cross Browser JavaScript DOMContentLoaded
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论