第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

未捕獲的類型錯(cuò)誤:$ 不是 (index):2 處的函數(shù)

未捕獲的類型錯(cuò)誤:$ 不是 (index):2 處的函數(shù)

PHP
元芳怎么了 2023-10-15 10:46:09
我在我的 WordPress 網(wǎng)站上遇到了這個(gè)錯(cuò)誤“Uncaught TypeError: $ is not a function at (index):2”我找到了這個(gè)解決方案來添加var $ = jQuery.noConflict();之前$( document ).ready(function(){但是,我在網(wǎng)站的主題文件夾中找不到“$( document ).ready(function(){”代碼來修復(fù)它。這是通過 Chrome 瀏覽器的檢查、源窗口獲得的確切代碼<html class="no-js" itemscope itemtype="https://schema.org/WebPage"><head><meta charset="UTF-8" /><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" /><link rel="alternate" hreflang="en" href="https://ccsi.global/"/><link rel="shortcut icon" href="https://ccsi.global/wp-content/uploads/2018/05/imageedit_89_3942571748.png" type="image/x-icon" /><link type="text/css" media="all" href="https://ccsi.global/wp-content/cache/autoptimize/css/autoptimize_9668264b3a77ccf7dc30b539d4038dbc.css" rel="stylesheet" /><title>Comcapint &#8211; Home &#8211; Compliance and Capacity Skills International</title><link rel='dns-prefetch' href='//fonts.googleapis.com' /><link rel='dns-prefetch' href='//s.w.org' /><link rel="alternate" type="application/rss+xml" title="Comcapint &raquo; Feed" href="https://ccsi.global/feed/" /><link rel="alternate" type="application/rss+xml" title="Comcapint &raquo; Comments Feed" href="https://ccsi.global/comments/feed/" /> <script type="text/javascript">window._wpemojiSettings = {"baseUrl":"https:\/\/s.w.org\/images\/core\/emoji\/13.0.0\/72x72\/","ext":".png","svgUrl":"https:\/\/s.w.org\/images\/core\/emoji\/13.0.0\/svg\/","svgExt":".svg","source":{"concatemoji":"https:\/\/ccsi.global\/wp-includes\/js\/wp-emoji-release.min.js?ver=5.5"}};$(".nav-tabs a").click(function(){  $(this).tab('show');});$('.nav-tabs a').on('shown.bs.tab', function(event){  var x = $(event.target).text();         // active tab  var y = $(event.relatedTarget).text();  // previous tab  $(".act span").text(x);  $(".prev span").text(y);});});
查看完整描述

1 回答

?
一只甜甜圈

TA貢獻(xiàn)1836條經(jīng)驗(yàn) 獲得超5個(gè)贊

大多數(shù) WordPress 模板已經(jīng)調(diào)用 noConflict()


當(dāng)您想$在代碼中使用時(shí),最好使用 IIFE 包裝器


(function($){

   // can use $ here

   $(document).ready....


})(jQuery);

jQuery還要確保您在加載庫(kù)之前沒有嘗試使用。使用wp_enqueue_script()將解決這個(gè)問題


查看完整回答
反對(duì) 回復(fù) 2023-10-15
  • 1 回答
  • 0 關(guān)注
  • 124 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)