cuốn sách gpt4 ai đã làm

javascript - 在 ajax 加载部分中不工作 jquery

In lại Tác giả: Walker 123 更新时间:2023-11-28 05:44:19 28 4
mua khóa gpt4 Nike

我用ajax加载了一些页面 Ajaxtabs我在页面中使用了 jquery 和 owl 轮播,但加载部件后,jquery 不起作用并且没有 owl div 的类和样式。

我的主页:



first tab content that no ajax



one.php & Two.php & Three.php 是我的 WordPress 自定义页面链接

在 one.php 中:



$args = array( 'post_type' => 'product', 'posts_per_page' => 10, 'product_cat' => 'print', 'orderby' => 'rand' );
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post(); global $product; ?>







如您所见,我在页面中保存了 10 个 woocommerce 帖子,我想将其加载为 ajax,html 代码加载良好,但 jquery 不适用于此 ajax 加载部分。

另一个奇怪的问题,当我将轮播放在#countrydivcontainer中的第一个选项卡中时,浏览器中的第一个 View 不是ajax,可以正常工作,但是当我在选项卡之间切换并加载其他部分并返回到第一个选项卡时,这也不起作用。

câu trả lời hay nhất

检查您正在调用最新的 jQuery

check also that you have added wp_head(); in header.php and wp_fooer(); in footer.php

关于javascript - 在 ajax 加载部分中不工作 jquery,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38673241/

28 4 0
Chứng chỉ ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com
Xem sitemap của VNExpress