我有一個WordPress插件網站,它使用一個插件,只需點擊一個按鈕即可輕鬆添加彈出窗口。工作正常,但現在每次點擊彈出按鈕時都會出現錯誤。除了錯誤之外,彈出窗口不再出現。相反,滾動條消失,頁面凍結。就好像一個隱形彈出窗口已經加載。在wordpress中刪除重複的JQuery庫
我打F12並抓獲被點擊的按鈕時的錯誤:
Uncaught TypeError: f.getClientRects is not a function
at r.fn.init.offset (jquery-3.2.1.min.js?ver=4.8.2:4)
at Object.getWithinInfo (position.min.js?ver=1.11.4&nocache=1:11)
at r.fn.init.a.fn.position (position.min.js?ver=1.11.4&nocache=1:11)
at r.fn.init.reposition (site.min.js?defer&ver=1.6.6&nocache=1:1)
at r.fn.init.e.fn.popmake (site.min.js?defer&ver=1.6.6&nocache=1:1)
at r.fn.init.open (site.min.js?defer&ver=1.6.6&nocache=1:1)
at r.fn.init.e.fn.popmake (site.min.js?defer&ver=1.6.6&nocache=1:1)
at HTMLButtonElement.<anonymous> (site.min.js?defer&ver=1.6.6&nocache=1:2)
at HTMLDocument.dispatch (jquery-3.2.1.min.js?ver=4.8.2:3)
at HTMLDocument.q.handle (jquery-3.2.1.min.js?ver=4.8.2:3)
我認爲這個問題涉及到重複安裝的JQuery庫,但我不知道是否有人能在我怎能方向指向我要麼刪除我的wordpress安裝中的重複庫或產生一個工作?
你可以使用這個https://codex.wordpress.org/Function_Reference/wp_dequeue_script – designtocode