Bootstrap 4输入组和jQuery虹膜颜色选择器目标选项
在我的目标Bootstrap 4输入组和jQuery虹膜颜色选择器目标选项,jquery,color-picker,Jquery,Color Picker,在我的目标#颜色选择器输入上使用时,颜色选择器插入在我的#颜色选择器输入之后,这会破坏颜色选择器样式,因为的样式是使用 看看我的小提琴,看看它看起来不好,因为bootstrap 4输入组flex css。。(见问题末尾的注释) 我想能够控制虹膜插入颜色选择器托盘html时调用 在阅读了target之后,我所能看到的唯一一件事就是能够控制这一切。所以我尝试了这个选项() 正确的原因和错误,我找不到一种方法,以目标或插入其他地方的颜色选择器 $('#color_picker').iris({
#颜色选择器
输入上使用时,颜色选择器插入在我的#颜色选择器
输入之后,这会破坏颜色选择器样式,因为的样式是使用
看看我的小提琴,看看它看起来不好,因为bootstrap 4输入组flex css。。(见问题末尾的注释)
我想能够控制虹膜插入颜色选择器托盘html时调用 在阅读了
target
之后,我所能看到的唯一一件事就是能够控制这一切。所以我尝试了这个选项()
正确的原因和错误,我找不到一种方法,以目标或插入其他地方的颜色选择器
$('#color_picker').iris({
// change where iris palette is inserted after
target: $(this).parent('.form-group'),
// do stuff when color is changed
change: function(event, ui) {
// change the prepend indicator
$(this).siblings().find('.input-group-text').css('background-color', ui.color.toString());
}
});
(上面代码的提琴)
片段
$('color\u picker').iris({
//当颜色改变时做一些事情
更改:功能(事件、用户界面){
//更改前置指示器
$(this.sides().find('.input group text').css('background-color',ui.color.toString());
}
});代码>
.input group prepend.input group text::before{
宽度:18px;
内容:“;
显示:块;
高度:1px;
}
$('#color_picker').iris({
// change where iris palette is inserted after
target: $(this).parent('.form-group'),
// do stuff when color is changed
change: function(event, ui) {
// change the prepend indicator
$(this).siblings().find('.input-group-text').css('background-color', ui.color.toString());
}
});