You should do it like so
var script=document.createElement('script');
script.type="text/javascript";
script.src=url;
$("body").append(script);
More Related Contents:
- Get the longest text in HTML document using Jquery or javascript
- Hide/Show image on one click [closed]
- How to move an element into another element?
- Convert blob to base64
- jquery (or pure js) simulate enter key pressed for testing
- Format date to MM/dd/yyyy in JavaScript [duplicate]
- jQuery: Get selected element tag name
- jQuery drop down menu closing by clicking outside
- How to get client IP address using jQuery
- jQuery: Finding partial class name [duplicate]
- My javascript is returning this error: $.ajax is not a function
- Detect Close windows event by jQuery
- Simple Screen Scraping using jQuery
- AJAX jQuery refresh div every 5 seconds
- jQuery change event on not firing in IE
- Save a pre element as PDF with CSS
- Input field for Tags separated by comma
- Center flex item in container, when surrounded by other flex items
- jQuery load content when scroll to bottom-100px of page, multiple events fired
- jQuery: How to listen for DOM changes?
- Using jQuery, how do you find only visible elements and leave hidden elements alone?
- How to get the image size (height & width) using JavaScript
- jQuery show/hide options from one select drop down, when option on other select dropdown is slected
- How can I remove wrapper (parent element) without removing the child?
- Jquery getJSON cross domain problems
- How to get an element by its href in jquery?
- How to negate code in “if” statement block in JavaScript -JQuery like ‘if not then..’
- jQuery $.ajax(), pass success data into separate function
- jQuery InnerText not including sub element
- Looping through Markers with Google Maps API v3 Problem