jQuery uncaught reference error - element is not defined

落爺英雄遲暮 提交于 2019-12-25 17:05:04

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!