I require jQuery 1.7 or later for something I'm working on that uses the .on() function, but when I include it I get the error: "TypeError: $.jPlayer is undefined" and the player breaks. Does anyone have any idea why this happens?

EDIT - Never mind, I forgot to remove the older version of jQuery, which was causing all of my issues. Please close this topic.

Comments

nbtechnologies’s picture

I have a little more information. I am using version 2.2.0 of the jquery.jplayer.min.js file, but have also tried 2.1.0 which has the same issue. What I have noticed is that it depends where in the header I include jQuery, if its before jquery.jplayer.min.js then the player works, but I can't use .on(). However if it's after, then I can use .on(), but the player breaks. I have a feeling I'm making some kind of simple and silly mistake here. Anyone?

nbtechnologies’s picture

Issue summary: View changes

I made a mistake.

yan’s picture

Issue summary: View changes

I got the same error because I unpacked the whole jplayer 2.9.2.tar.gz to sites/all/libraries/jplayer so that jquery.jplayer.min.js was at sites/all/libraries/jplayer/dist/jplayer/jquery.jplayer.min.js.

But then I read that what needs to live in sites/all/libraries/jplayer is the contents of dist/jplayer/ inside the jplayer archive, i.e. jquery.jplayer.min.js needs to be found at sites/all/libraries/jplayer/jquery.jplayer.min.js

yan’s picture

Status: Active » Closed (works as designed)