[eluser]Unknown[/eluser]
Hello, I'm trying to use jPlayer inside a view but I get that error from firebug:
Code:
TypeError: $("#jquery_jplayer_1").jPlayer is not a function
However, if the code is stored on server's home all is working correctly (so I think that is a problem with CI).
Thats the code:
Code:
<sscript type="text/javascript" src="/js/jquery-latest.min.js"></sscript>
<sscript type="text/javascript" src="/js/jquery.jplayer.min.js"></sscript>
<sscript type="text/javascript">
$(document).ready(function(){
$("#jquery_jplayer_1").jPlayer( {
ready: function () {
$(this).jPlayer("setMedia", {
m4v: "/videos/video.mp4",
webmv: "/videos/video.webm"
}).jPlayer("play"); // Attempts to Auto-Play the media
},
solution: "html, flash", // Flash with an HTML5 fallback.
supplied: "m4v, webmv",
swfPath: "/js"
});
});
</sscript>
<div id="jquery_jplayer_1"></div>
Note that really "sscript" is "script".
Any ideas?
Thanks