jQuery Chosen更换搜索图标按钮
2021-02-06 15:29:18
js:
//下拉下拉框触发事件
$("#FUNDID").chosen().on('chosen:showing_dropdown', function () {
//隐藏搜索按钮
$('.chosen-search').addClass('HideChosenAfterBtn');
//增加经费按钮
$('.chosen-search>input').after('<span id="addFund" title="增加经费项" alt="增加经费项" class="fa fa-plus-circle"></span>');
});
//下拉下拉框触发事件
//增加按钮点击事件
$('body').on('click','#addFund',function(){
//打开经费新增页面
layer.open({
type: 2,
title: '经费表新增',
shadeClose: false,
shade: 0.3,
maxmin: true, //开启最大化最小化按钮
area: ['893px', '600px'],
content: '/aa/fundtable/index'
});
//打开经费新增页面
})
//增加按钮点击事件
css:
.HideChosenAfterBtn:after{
content: none!important;
}
.HideChosenAfterBtn>span{
display: inline-block;
color: #888;
font-family: FontAwesome;
font-size: 14px;
position: absolute;
top: 11.5px;
right: 12px;
cursor:pointer;
}
//下拉下拉框触发事件
$("#FUNDID").chosen().on('chosen:showing_dropdown', function () {
//隐藏搜索按钮
$('.chosen-search').addClass('HideChosenAfterBtn');
//增加经费按钮
$('.chosen-search>input').after('<span id="addFund" title="增加经费项" alt="增加经费项" class="fa fa-plus-circle"></span>');
});
//下拉下拉框触发事件
//增加按钮点击事件
$('body').on('click','#addFund',function(){
//打开经费新增页面
layer.open({
type: 2,
title: '经费表新增',
shadeClose: false,
shade: 0.3,
maxmin: true, //开启最大化最小化按钮
area: ['893px', '600px'],
content: '/aa/fundtable/index'
});
//打开经费新增页面
})
//增加按钮点击事件
css:
.HideChosenAfterBtn:after{
content: none!important;
}
.HideChosenAfterBtn>span{
display: inline-block;
color: #888;
font-family: FontAwesome;
font-size: 14px;
position: absolute;
top: 11.5px;
right: 12px;
cursor:pointer;
}