Reputation: 6254
I am trying to use jwplayer. I have used it before; I didn't have this problem then, but now I am getting this error. It is saying the object has no method setup.
Here is my HTML code:
<div id="#here-will-be-the-video">Loading Video...</div>
Here is the JS code:
$(document).ready(function(){
console.log($('#here-will-be-the-video'));
jwplayer('here-will-be-the-video').setup({
file: "http://youtu.be/QtmyQRH3DEo",
image: "http://placehold.it/500x300",
width: 500,
height: 300
});
});
Upvotes: 1
Views: 738
Reputation: 10694
It should be
<div id="here-will-be-the-video">Loading Video...</div>
Not
<div id="#here-will-be-the-video">Loading Video...</div>
And then
jwplayer('here-will-be-the-video').setup(
Check this link http://jsfiddle.net/ramp/nF7Mw/
Upvotes: 2