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
Comment #1
nbtechnologies commentedI 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?
Comment #1.0
nbtechnologies commentedI made a mistake.
Comment #2
yan commentedI got the same error because I unpacked the whole jplayer 2.9.2.tar.gz to
sites/all/libraries/jplayerso thatjquery.jplayer.min.jswas atsites/all/libraries/jplayer/dist/jplayer/jquery.jplayer.min.js.But then I read that what needs to live in
sites/all/libraries/jplayeris the contents ofdist/jplayer/inside the jplayer archive, i.e.jquery.jplayer.min.jsneeds to be found atsites/all/libraries/jplayer/jquery.jplayer.min.jsComment #3
yan commented