Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/433.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/79.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 使用jquery展开视频标记_Javascript_Jquery_Video_Tags_Forced Unwrapping - Fatal编程技术网

Javascript 使用jquery展开视频标记

Javascript 使用jquery展开视频标记,javascript,jquery,video,tags,forced-unwrapping,Javascript,Jquery,Video,Tags,Forced Unwrapping,我有这个: <div class="vid"> <video> bla bla bla </video> </div> 控制台窗口中的结果是: TypeError: undefined is not a function message: "undefined is not a function" stack: (...) get stack: function () { [native code] } set stack: function

我有这个:

<div class="vid">

<video> bla bla bla </video>

</div>
控制台窗口中的结果是:

TypeError: undefined is not a function
message: "undefined is not a function"
stack: (...)
get stack: function () { [native code] }
set stack: function () { [native code] }
__proto__: Error
有线索吗


太多了

似乎未定义
$
。您确定jQuery已加载吗

您可以尝试
console.log
ing这些:

console.log(window.jQuery); // What's the output of this?
console.log($); // What's the output of this? 
console.log(jQuery('video')); // What's the output of this? 

这是调试问题的好方法。

页面上是否加载了jQuery?该错误是调用
$(…)
.unwrap()
的结果吗?尝试执行
var$vid=$('video')$参阅展开()并查看错误发生在哪一行。您是否在DOM就绪后执行它(例如,在
$(文档)内部)。就绪(函数(){…})
?ajp15243,答案是:D.fn.D.init{0:video,length:1,prevObject:D.fn.D.init,init:function,jquery:“1.2.6”,size:function…}0:video length:1 prevObject:D.fn.D.init proto:Objectand$vid.unwrap();TypeError:undefined不是一个函数应该注意的是,如果页面上没有加载jQuery,最后一个将失败
TypeError:undefined不是一个函数{return new D.fn.init(a,b)}未定义(2)函数(a,b){return new D.fn.init(a,b)}未定义(3)D.fn.D.init{0:video,length:1,prevObject:D.fn.D.init,init:function,jquery:“1.2.6”,size:function…}0:video length:1 prevObject:D.fn.D.init proto:Object undefined这里有更多jquery正在运行,是的,jquery的序列有问题。现在我把not功能块放在第一位。
console.log(window.jQuery); // What's the output of this?
console.log($); // What's the output of this? 
console.log(jQuery('video')); // What's the output of this?