Jquery - 用特殊的 ui 效果替换所有 show() 和 hide() (不是硬编码)

发布于 2024-09-24 05:01:44 字数 256 浏览 2 评论 0原文

我只在我的网站上使用 hide() 和 show() 方法。 但有些用户想要更多的效果。就像 jquery UI(弹跳、剪辑、滑动) 一样。

是否可以替换(不是硬编码)所有 hide() & show() 方法具有(例如)“反弹”效果?

让用户可以决定自己想要哪种效果?

提前致谢!
彼得

i only use the hide() and the show() method on my website.
But some user want more effect's. Like the jquery UI (bounce, clip, slide).

Is it possible to replace (not hardcoded) all hide() & show() methods with the (for example) "bounce" effect?

So that the user can decide wich effect he want?

Thanks in advance!
Peter

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

春风十里 2024-10-01 05:01:44

hide() 的方法签名如下所示

hide( effect, [options], [speed], [callback] )

因此您唯一要做的就是更改特定用户的效果变量。

IE
User1 效果 = 反弹;
User2 effect = drop;

The Method Signature for hide() looks like this

hide( effect, [options], [speed], [callback] )

So the only thing you have to do is to change the effect variable for the specific user.

i.e.
User1 effect = bounce;
User2 effect = drop;

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文