Embedding WebGL using external JS

first off, as your site is https, you need to invoke that script via https, not http.

Secondly, it appears that it’s using jQuery incorrectly. WordPress uses jQuery in safe mode, which is why you get $ is not a function.

Uncaught TypeError: url.indexOf is not a function
    at jQuery.fn.init.jQuery.fn.load (3Dmol.js:10091)
    at theme-scripts.js?ver=5.4.2:289
3Dmol.js:3841 jQuery.Deferred exception: $ is not a function TypeError: $ is not a function
    at Object.$3Dmol.autoload (https://3dmol.csb.pitt.edu/build/3Dmol.js:26230:9)
    at HTMLDocument.<anonymous> (https://3dmol.csb.pitt.edu/build/3Dmol.js:26434:12)
    at mightThrow (https://3dmol.csb.pitt.edu/build/3Dmol.js:3557:29)
    at process (https://3dmol.csb.pitt.edu/build/3Dmol.js:3625:12) undefined
jQuery.Deferred.exceptionHook @ 3Dmol.js:3841
3Dmol.js:3850 Uncaught TypeError: $ is not a function
    at Object.$3Dmol.autoload (3Dmol.js:26230)
    at HTMLDocument.<anonymous> (3Dmol.js:26434)
    at mightThrow (3Dmol.js:3557)

Oh my word – just adding the https fixed this. Of all the things not to spot… Thanks very much for your help!



Source link