Google Charts API shows blank screen with $(document).ready method

前端 未结 9 1131
清酒与你
清酒与你 2021-02-05 03:36

I\'ve got several functions that instantiate various charts using Google Charts API.

When I call them without jQuery\'s $(document).ready method, everything

9条回答
  •  灰色年华
    2021-02-05 04:01

    For an alternate solution you can use 'autoloading' to include the packages you want in the script tag. This negates the need for "google.setOnLoadCallback".

    see https://developers.google.com/loader/#AutoLoading for details.

    So, you can do everything as you would normally from as jquery document ready event.

    There is also a wizard that can set up a URL for you, but currently the link is broken. Here it is anyway: http://code.google.com/apis/loader/autoloader-wizard.html

提交回复
热议问题