johnpolacek / BigVideo.js

The jQuery Plugin for Big Background Video (and Images)
http://johnpolacek.github.io/BigVideo.js/
2.25k stars 422 forks source link

Drupal 7 > Uncaught TypeError: The element or ID supplied is not valid #163

Open Gattermeier opened 9 years ago

Gattermeier commented 9 years ago

In Drupal 7 I have to use jQuery via anonymous functions:

(function($) { var BV = new $.BigVideo(); BV.init(); BV.show('http://vjs.zencdn.net/v/oceans.mp4'); })(jQuery);

However, I am running into following error, I can't seem to figure out:

Uncaught TypeError: The element or ID supplied is not valid. (VideoJS)VideoJS @ video.js?nn4j8i:21$.BigVideo.BigVideo.init @ bigvideo.js:231

hacfi commented 9 years ago

That’s very odd as BigVideo creates the container itself. Can you check with a debugger why https://github.com/dfcb/BigVideo.js/blob/master/lib/bigvideo.js#L262 or https://github.com/dfcb/BigVideo.js/blob/master/lib/bigvideo.js#L266 isn’t working?