简体   繁体   中英

Javascript error in the chrome console

I recently used the famous isotope plugin in my theme. It all works fine on the page in which it is used, but in the other appears a problem with the console (I use chrome).

Uncaught TypeError: Object [object Object] has no method 'isotope'

This is because all the pages are attached to the file custom.js where there is the call to the function isotope. Can I solve this problem without having to edit the file custom.js eliminating the reference to the function and having to put it on every page in which it is used directly in the 'html?

Thanks a lot in advance to all

绝对要确保将脚本拖到页面中,一种检查方法是使用Chrome调试器中的“源”标签并搜索文件。

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