Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/variables/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Bootstrap 4输入组和jQuery虹膜颜色选择器目标选项_Jquery_Color Picker - Fatal编程技术网

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());

  }

});