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

下载地址

jQuery插件-颜色选择器

Created2013-07-03   Views 2692    Author 懒人程序
jQuery插件-颜色选择器
<p>一个简单的jQuery<p>一个简单的jQuery插件-颜色选择器,在你选择的颜色一样Adobe Photoshop</p>
<p>使用方法如下:</p>
<p>引入JS和CSS文件</p>
<blockquote>
<p>&lt;link rel="stylesheet" media="screen" type="text/css" href="css/colorpicker.css" /&gt;<br>
&lt;script type="text/javascript" src="js/colorpicker.js"&gt;&lt;/script&gt;<br>
</p>
</blockquote>
<p>调用代码:</p>
<blockquote>
<p>$('input').ColorPicker(options);<br>
</p>
</blockquote>
<h3>Options</h3>
<p>A hash of parameters. All parameters are optional.</p>
<p> </p>
<table>
<tbody>
<tr>
<td><strong>eventName</strong></td>
<td>string</td>
<td>The desired event to trigger the colorpicker. Default: 'click'</td>
</tr>
<tr>
<td><strong>color</strong></td>
<td>string or hash</td>
<td>The default color. String for hex color or hash for RGB and HSB ({r:255, r:0, b:0}) . Default: 'ff0000'</td>
</tr>
<tr>
<td><strong>flat</strong></td>
<td>boolean</td>
<td>Whatever if the color picker is appended to the element or triggered by an event. Default false</td>
</tr>
<tr>
<td><strong>livePreview</strong></td>
<td>boolean</td>
<td>Whatever if the color values are filled in the fields while changing values on selector or a field. If false it may improve speed. Default true</td>
</tr>
<tr>
<td><strong>onShow</strong></td>
<td>function</td>
<td>Callback function triggered when the color picker is shown</td>
</tr>
<tr>
<td><strong>onBeforeShow</strong></td>
<td>function</td>
<td>Callback function triggered before the color picker is shown</td>
</tr>
<tr>
<td><strong>onHide</strong></td>
<td>function</td>
<td>Callback function triggered when the color picker is hidden</td>
</tr>
<tr>
<td><strong>onChange</strong></td>
<td>function</td>
<td>Callback function triggered when the color is changed</td>
</tr>
<tr>
<td><strong>onSubmit</strong></td>
<td>function</td>
<td>Callback function triggered when the color it is chosen</td>
</tr>
</tbody>
</table>
<p>设置颜色:</p>
<blockquote>
<p>$('input').ColorPicker(options);<br>
</p>
</blockquote>
插件-颜色选择器,在你选择的颜色一样Adobe Photoshop</p>
<p>使用方法如下:</p>
<p>引入JS和CSS文件</p>
<blockquote>
<p>&lt;link rel="stylesheet" media="screen" type="text/css" href="css/colorpicker.css" /&gt;<br>
&lt;script type="text/javascript" src="js/colorpicker.js"&gt;&lt;/script&gt;<br>
</p>
</blockquote>
<p>调用代码:</p>
<blockquote>
<p>$('input').ColorPicker(options);<br>
</p>
</blockquote>
<h3>Options</h3>
<p>A hash of parameters. All parameters are optional.</p>
<p> </p>
<table>
<tbody>
<tr>
<td><strong>eventName</strong></td>
<td>string</td>
<td>The desired event to trigger the colorpicker. Default: 'click'</td>
</tr>
<tr>
<td><strong>color</strong></td>
<td>string or hash</td>
<td>The default color. String for hex color or hash for RGB and HSB ({r:255, r:0, b:0}) . Default: 'ff0000'</td>
</tr>
<tr>
<td><strong>flat</strong></td>
<td>boolean</td>
<td>Whatever if the color picker is appended to the element or triggered by an event. Default false</td>
</tr>
<tr>
<td><strong>livePreview</strong></td>
<td>boolean</td>
<td>Whatever if the color values are filled in the fields while changing values on selector or a field. If false it may improve speed. Default true</td>
</tr>
<tr>
<td><strong>onShow</strong></td>
<td>function</td>
<td>Callback function triggered when the color picker is shown</td>
</tr>
<tr>
<td><strong>onBeforeShow</strong></td>
<td>function</td>
<td>Callback function triggered before the color picker is shown</td>
</tr>
<tr>
<td><strong>onHide</strong></td>
<td>function</td>
<td>Callback function triggered when the color picker is hidden</td>
</tr>
<tr>
<td><strong>onChange</strong></td>
<td>function</td>
<td>Callback function triggered when the color is changed</td>
</tr>
<tr>
<td><strong>onSubmit</strong></td>
<td>function</td>
<td>Callback function triggered when the color it is chosen</td>
</tr>
</tbody>
</table>
<p>设置颜色:</p>
<blockquote>
<p>$('input').ColorPicker(options);<br>
</p>
</blockquote>
上一篇:没有了
下一篇: 多种jQuery颜色选择插件
支持键盘 ← →

邮件订阅

订阅我们的精彩内容