dimanche 11 janvier 2015

Include js file in jquery


Vote count:

0




I tried to include another js file in jquery. I have found this exmaple code and tried, but browser console give me this error.


CODE



$.getScript( "js/balloon.js", function( data, textStatus, jqxhr ) {

console.log( data ); // Data returned
console.log( textStatus ); // Success
console.log( jqxhr.status ); // 200
console.log( "Load was performed." );
});


ERROR


XMLHttpRequest cannot load file:///C:/EDIT/swf/js/balloon.js?_=1420941386739. Cross origin requests are only supported for protocol schemes: http, data, chrome-extension, https, chrome-extension-resource.


What mistake I have made, can anyone tell me ? Thanks.


If there is another good example to include js file in js please suggest for me. Thanks again.



asked 31 secs ago







Include js file in jquery

Aucun commentaire:

Enregistrer un commentaire