gpt4 book ai didi

jquery - 在使用 jquery 加 css 单击向左或向右滑动 div

转载 作者:太空宇宙 更新时间:2023-11-04 12:02:45 27 4
gpt4 key购买 nike

在下面的两张图片中,我试图描述我想在我的 jQuery 滑动中完成什么

there are multiple product boxes in my website

i need a popup next to particular clicked product and other product box should be moved to next line

IMAGE 01 :我的网站上有多个产品框

IMAGE 02:我需要在特定点击的产品旁边弹出一个窗口,其他产品框应该移到下一行

最佳答案

您可以通过隐藏描述并使用 jQuery 显示它们来实现。问题是:如果你想让 desc div 推送产品 div,当你点击最后一列的产品时,它会很奇怪。

演示:http://jsfiddle.net/Paf_Sebastien/tzg3rswv/

/* jQuery */

$(function() {
$('.product').click(function() {
$('.desc').hide();
$(this).next().css('display', 'inline-block');
});
});

关于jquery - 在使用 jquery 加 css 单击向左或向右滑动 div,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29626546/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com