簡體   English   中英

獲取ReferenceError:$未在Plunker上的angularJS指令中定義,但在Fiddle上未定義

[英]Getting ReferenceError: $ is not defined in angularJS directive on Plunker but not on Fiddle

我正在嘗試使用有角JS實現div的Collapse-expand行為。 我發現Fiddle的效果很好,但是當我從Plunker嘗試使用它時,

ReferenceError: $ is not defined
    at link (http://run.plnkr.co/IckVASWWji617HjT/script.js:11:13)

這是

$(element).click( function() {  // in script.js

它如何在Fiddle上工作?

$通常指的是jQuery ,在這種情況下它指的是jQuery

通過選擇右側欄中的“查找和添加外部庫”,將jQuery添加到您的插件中,搜索jquery並將其添加。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM