0

私はこれを持っています:

<div class="vid">

<video> bla bla bla </video>

</div>

このビデオタグをアンラップする必要があるため、次のことを試しました。

$( "video" ).unwrap();

コンソール ウィンドウの結果は次のとおりです。

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

どんな手掛かり?

どうも!

4

1 に答える 1

1

$定義されていないようです。jQuery がロードされていますか?

これらを試すことができconsole.logます:

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? 

これは、問題をデバッグする良い方法です。

于 2014-08-27T15:06:23.717 に答える