jQuery 加减切换

发布于 2024-10-07 20:26:18 字数 203 浏览 0 评论 0原文

我正在尝试使用 jQuery 在数据网格中实现加号/减号图标。展开时,减号图标出现,但折叠时加号图标不会回来。

这是实现: http://jsfiddle.net/pixelfx/3fwyf/10/

可以任何人请查看代码。

I am trying to implement plus/minus icons in a the datagrid using jQuery. On expand, minus icon is coming but on collapse the plus icon is not coming back.

Here is the implementation: http://jsfiddle.net/pixelfx/3fwyf/10/

Can anyone please look into the code.

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

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

发布评论

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

评论(2

时光磨忆 2024-10-14 20:26:18

替换

$('.minus').show();
$('.add').hide();

$('.minus').toggle();
$('.add').toggle();

Replace

$('.minus').show();
$('.add').hide();

with

$('.minus').toggle();
$('.add').toggle();
弃爱 2024-10-14 20:26:18

正如 Sandeepan Nath 的回答,但一句话。

替换

$('.minus').show();
$('.add').hide();

$('.minus, .add').toggle();

As Sandeepan Nath's answer, but in one line.

Replace

$('.minus').show();
$('.add').hide();

With

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