问题
I implemented the following plugin in into a drupal website https://github.com/linnett/backgroundVideo following their instructions to the T.
I am receiving a jQuery uncaught reference error: element is not defined
error. This is my site.
回答1:
the variable element
is supposed to be a reference to your video element.
var element = "#TheVideoElementId";
回答2:
According to the github project and also to the examples which are provided, element
is just a placeholder for your <video>
wrapper. So if you've copied the example, you just have to use the following.
jQuery(document).ready(function() {
jQuery('#my-video').backgroundVideo({
$videoWrap: $('#cmn-video-demo3__container'),
$outerWrap: $('.block-block block-block-10')
});
});
来源:https://stackoverflow.com/questions/35495286/jquery-uncaught-reference-error-element-is-not-defined