EasyUI Forum
June 28, 2024, 06:30:40 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: hide delete icon and put another on TagBox  (Read 3452 times)
MSAG
Newbie
*
Posts: 41



View Profile Email
« on: March 17, 2019, 05:11:04 AM »

Hi
How can hide delete icon in TagBox
and put another one that is not delete tag
and change courser tags in TagBox hand
« Last Edit: March 17, 2019, 05:12:53 AM by MSAG » Logged
jarry
Administrator
Hero Member
*****
Posts: 2268


View Profile Email
« Reply #1 on: March 18, 2019, 12:07:52 AM »

This is the code shows how to hide the remove button and add the new icon instead.
Code:
<style type="text/css">
.tagbox-remove{
display: none;
}
.tagbox-icon {
    position: absolute;
    display: block;
    width: 16px;
    height: 16px;
    right: 2px;
    top: 50%;
    margin-top: -8px;
    opacity: 0.6;
    filter: alpha(opacity=60);
}
.tagbox-icon:hove{
    opacity: 1.0;
    filter: alpha(opacity=100);
}
</style>
<script type="text/javascript">
$(function(){
$('#tb').tagbox({
tagFormatter: function(value, row){
var icon = '<a href="javascript:;" class="tagbox-icon icon-add"></a>';
return value+icon;
}
})
})
</script>
Logged
MSAG
Newbie
*
Posts: 41



View Profile Email
« Reply #2 on: March 18, 2019, 01:21:39 AM »

thanks its work
but this code effect on all tagbox
i want to apply that for specific one
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!