jQuery v1.8.x-1.12.x .getScript() and .ajax() not executing PlumX external script -


i using plumx widget script publication metrics such this:
https://plu.mx/kaust/w/a/3b-x5905ezrzvemgg_s7ptyz3ajtrxr1geveoir_vmu

the usage simple, use specific html code script tag. here test snippet:

<meta http-equiv="content-type" content="text/html; charset=utf-8">    <script type="text/javascript" src="https://code.jquery.com/jquery-1.8.3.min.js"></script>  <script type="text/javascript">  $(window).on('load', function(){  $.getscript('https://code.jquery.com/jquery-3.2.1.min.js', function(){  $.getscript('https://d39af2mgp1pqhg.cloudfront.net/widget-popup.js');});});  </script>    <a href="https://plu.mx/kaust/a/?doi=10.1002%2fsmll.201603080" class="plumx-plum-print-popup" data-popup="right" data-hide-when-empty="true" data-site="kaust" data-badge="false">nanomembrane-based, thermal-transport biosensor living cells.: profile on plumx</a>

due restrictions on sharepoint site administering, cannot include plumx script tag directly, load jquery's .getscript() approach. before website using jquery version 1.6.1 , working. switched v1.8.3 , externally loaded script stopped executing, although there external script not affected.

here screenshots of network resources tab when page has loaded - before , after:

as should be (errors come script - unavailable (get) resources)

enter image description here

with jquery v1.8.x-1.12.x

enter image description here

i wonder how fix issue. on local copy of webpage acts same way if include plumx widget script tag directly in html works again cannot @ sharepoint side. workaround working me this:

$(window).on('load', function(){ $.getscript('https://code.jquery.com/jquery-3.2.1.min.js', function(){ $.getscript('https://d39af2mgp1pqhg.cloudfront.net/widget-popup.js')});}); 

it first loads version of jquery after loads plumx widget script. jquery versions other v1.8.x-1.12.x (i.e. v1.2.x-1.7.x , v2.x-3.x) load/run script expected, cannot figure out why when older minified versions task! $(window).on('load') used purpose not break other js code on page. not best practice have jquery script loaded more once, however, necessary. want see if possible fix problem without loading jquery version.

these change logs , release notes help, ajax section:

https://blog.jquery.com/2012/08/09/jquery-1-8-released/

https://blog.jquery.com/2013/04/18/jquery-2-0-released/

https://gist.github.com/teppeis/9264080

i tried fiddle around altering jquery files without success.

and not find .ajax() combination work v1.8.3.


Comments

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -