我正在嘗試將 Woocommerce 商店中的產品頁面選項卡轉換為手風琴式,但無法正常工作。當我點擊鏈接時,下拉菜單不顯示,它什么也不做...高度應該像我的“+”圖標一樣動畫,但什么也沒有發生??雌饋硭恍枰趩螕舻脑厣咸砑印癷s-open”類。所以我認為我的錯誤在于我的js,但我不知道在哪里!這是我的 tabs.php 文件:<?php/** * Single Product tabs * * This template can be overridden by copying it to yourtheme/woocommerce/single-product/tabs/tabs.php. * * HOWEVER, on occasion WooCommerce will need to update template files and you * (the theme developer) will need to copy the new files to your theme to * maintain compatibility. We try to do this as little as possible, but it does * happen. When this occurs the version of the template file will be bumped and * the readme will list any important changes. * * @see https://docs.woocommerce.com/document/template-structure/ * @package WooCommerce\Templates * @version 3.8.0 */if (!defined('ABSPATH')) { exit;}/** * Filter tabs and allow third parties to add their own. * * Each tab is an array containing title, callback and priority. * * @see woocommerce_default_product_tabs() */$product_tabs = apply_filters('woocommerce_product_tabs', array());if (!empty($product_tabs)) : ?> <div class="c-accordion"> <div class="c-accordion__wrapper"> <div class="c-accordion__content-wrapper"> <?php foreach ($product_tabs as $key => $product_tab) : ?> <div class="c-accordion__content js-accordion"> <div class="c-accordion__content-title"> <span class="c-accordion__plus"></span> <p class="u-a1"> <?php echo wp_kses_post(apply_filters('woocommerce_product_' . $key . '_tab_title', $product_tab['title'], $key)); ?> </p> </div> <div class="c-accordion__content-main js-content">
手風琴選項卡 (Woocommerce)
溫溫醬
2023-08-05 11:04:40