2014-02-08 67 views
1

我正在使用jQuery標記..jQuery tagit刪除點擊

在右上角有一個小關閉按鈕,用於刪除標記。

我現在的問題是,是否有一種方法可以刪除標籤而不是點擊它們?

回答

2

首先,除去「X」從關元件:去487線tagit.js,及時排除X,像這樣:

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

然後,在主題的css文件中使用的是,修改標記關閉類:

對於簡單的藍色主題,例如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; 
    } 
+0

非常感謝!它非常完美! :) – Tommy