一个透过 .prepend 或者 .text 做更新的页面中,有时候在检索第二次的时候 $(‘#fool’) 选择器 会提示:
“TypeError: undefined is not a function”
此问题通常是由于引用多个 js 库相互冲突导致的,解决的办法是把 $(‘#fool’) 换成 jQuery(‘#fool’) 。
一个透过 .prepend 或者 .text 做更新的页面中,有时候在检索第二次的时候 $(‘#fool’) 选择器 会提示:
“TypeError: undefined is not a function”
此问题通常是由于引用多个 js 库相互冲突导致的,解决的办法是把 $(‘#fool’) 换成 jQuery(‘#fool’) 。
方案二:
在使用 $ 之前先声明:
var $ =jQuery.noConflict();
Leave a Reply