简体   繁体   中英

$(..).filterizr is not a function & does it have anything to do with package-lock.json

Hi I'm including a gallery plugin called Filterizr for my wordpress theme and NPM installed it and got is as a dependancy

PACKAGE.JSON

 "dependencies": {
  "filterizr": "^1.2.5"
 },

But I have also been getting a package-lock.json recently and wonder if it has anything to do with it. I also ran into problem using Angular CDN and saw a package-lock.json as well.

I am running my instantiating filterizr in main.js

 (function($){
     $('.filtr-container').filterizr();
 //Filterz


 })(jQuery);

My package-lock.json has my filterized plugin as well

PACKGE-LOCK.JSON

},
"filterizr": {
  "version": "1.2.5",
  "resolved": "https://registry.npmjs.org/filterizr/-/filterizr-1.2.5.tgz",
  "integrity": "sha1-sOUe51rH5GQxrhRFkUmpJXeWAuw="
},

Thank you in advance!

如果您正在构建一个简单的静态网站,并且已经在自己导入jQuery,请确保下载/dist/jquery.filterizr.min.js并将其简单地导入jQuery之后。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM