支付宝赞助帐号:service@kuitao8.com 

下载地址

jquery颜色选择器colpick下载

Created2014-02-26   Views 3050    Author 懒人程序
jquery颜色选择器colpick下载

HTML

# <input type="text" id="picker"></input>

JS

$('#picker').colpick({
	layout:'hex',
	submit:0,
	colorScheme:'dark',
	onChange:function(hsb,hex,rgb,el,bySetColor) {
		$(el).css('border-color','#'+hex);
		// Fill the text box just if the color was set using the picker, and not the colpickSetColor function.
		if(!bySetColor) $(el).val(hex);
	}
}).keyup(function(){
	$(this).colpickSetColor(this.value);
});

CSS

#picker {
	margin:0;
	padding:0;
	border:0;
	width:70px;
	height:20px;
	border-right:20px solid green;
	line-height:20px;
}
上一篇: html5颜色选择器下载
下一篇: jquery bootstrap颜色选择器效果下载
支持键盘 ← →

邮件订阅

订阅我们的精彩内容