gpt4 book ai didi

javascript - jQuery tagit 删除点击

转载 作者:行者123 更新时间:2023-11-30 17:37:58 25 4
gpt4 key购买 nike

我正在使用 jQuery tagit..

在右上角有一个小的关闭按钮,用于删除标签。

我现在的问题是,有没有一种方法可以通过点击标签来删除标签?

最佳答案

首先,要从关闭元素中删除“x”:转到 tagit.js 的 487. 行,然后删除 x,如下所示:

 + '<div class="tagit-label">' + newTag.label + '</div>' + '<a class="tagit-close"> </a></li>');

然后,在你使用的主题的css文件中,修改tagit-close类:

对于简单的蓝色主题,例如tagit-simple-blue.css:

 ul.tagit li.tagit-choice a.tagit-close {
/* color: #777777;
cursor: pointer;
font-size: 12px;
font-weight: bold;
outline: medium none;
padding: 2px 0 2px 3px;
text-decoration: none;


top: 0;
right: 3px;
text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.7);*/
width:100%;
height:100%;
top:0;
left:0;
cursor: pointer;
position: absolute;
display: block;
}

关于javascript - jQuery tagit 删除点击,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21650565/

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