Mixed content suggests that you are loading your script from an external source served over http
onto your page which is server over https
So, you can use this
script.src = https://code.jquery.com/jquery-latest.min.js;
Here is a related mozilla documentation.