JQuery+JavaScript Colorpicker - Spectrum
페이지 정보
- 작성자후야
- 조회 : 195
- 작성일 : 2021-01-28 00:21
본문
Colorpicker - Spectrum
//CDN
<script src="https://cdn.jsdelivr.net/npm/spectrum-colorpicker2/dist/spectrum.min.js">
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/spectrum-colorpicker2/dist/spectrum.min.css">
<input id="color-picker" value='#276cb8' />
<script>
$('#color-picker').spectrum({
type: "component"
});
//options
$("#picker").spectrum({
color: tinycolor,
type: sting, // text, component, color, flat
showInput: bool,
showInitial: bool,
allowEmpty: bool,
showAlpha: bool,
disabled: bool,
localStorageKey: string,
showPalette: bool,
showPaletteOnly: bool,
togglePaletteOnly: bool,
showSelectionPalette: bool,
clickoutFiresChange: bool,
containerClassName: string,
replacerClassName: string,
preferredFormat: string,
maxSelectionSize: int,
palette: [[string]],
selectionPalette: [string],
// specify locale
locale: string,
// or directly change the translations
cancelText: string,
chooseText: string,
togglePaletteMoreText: string,
togglePaletteLessText: string,
clearText: string,
noColorSelectedText: string,
});
</script>
첨부파일
- 이전글TouchSwipe a jQuery plugin for touch devices 2021.01.28
- 다음글input 한글, 숫자, 영어만 입력 2021.01.28