I'm trying to load an external Javascript file from a website to a local js file.. i've tried this
(function($) {
$("head").append('<script type="text/javascript" src="http://URL_TO_SITE/jquery.acornmediaplayer.js"></script>');
setTimeout(function() {
$('.jvideo').acornMediaPlayer();
}, 2000);
})(jQuery);
but it gives me
[object Object] has no method acornMediaPlayer
i've also tried $.getScript but it gives me the same result