Is it possible to change the “src” attribute of an existing <script> element using Jquery.attr()? It seemed like a simple way to get JSONP to work but I am not able to make this work for me.
Is it possible to change the src attribute of an existing <script> element using
Share
It turns out that a script’s
srccan only be set once! It is not possible to change thesrcattribute of an existing<script>element in the DOM. However, a dynamically created<script>element can have its source set (but exactly once!)