EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: MSAG on March 17, 2019, 05:11:04 AM



Title: hide delete icon and put another on TagBox
Post by: MSAG 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


Title: Re: hide delete icon and put another on TagBox
Post by: jarry 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>


Title: Re: hide delete icon and put another on TagBox
Post by: MSAG 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