gpt4 book ai didi

jQuery 滑出效果问题

转载 作者:行者123 更新时间:2023-12-01 03:19:55 25 4
gpt4 key购买 nike

我试图使用下面的函数让 DIV 在单击时从左向右滑出,但它甚至没有移动。任何想法可能是什么问题。

功能

<script type="text/javascript">

$("#teller").click(function () {
$(this).show("slide", { direction: "right" }, 1000);
});
</script>

有问题的 DIV

<div id="teller">
<a href="#"><img src="images/teller.png" width="44" height="329" alt="Tell a freind button" />
</a>
</div><!-- End Teller -->

最佳答案

而不是

 $(this).show("slideOut", { direction: "right" }, 1000);

使用幻灯片

 $(this).show("slide", { direction: "right" }, 1000);

如果它已经可见并且您想滑出,请使用隐藏和向右滑动的组合

$(this).hide("slide", { direction: "right" }, 1000);

关于jQuery 滑出效果问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11109498/

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