mirror of
https://github.com/PitPik/tinyColorPicker
synced 2025-07-02 23:54:29 -06:00
bower support
This commit is contained in:
parent
4eab02b6ad
commit
046c0c5619
33
bower.json
Normal file
33
bower.json
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
{
|
||||||
|
"name": "tinyColorPicker",
|
||||||
|
"description": "Tiny jQuery color picker for mobile and desktop with alpha channel",
|
||||||
|
"main": "jqColorPicker.min.js",
|
||||||
|
"authors": [
|
||||||
|
"peterd <peter@dematte.at>"
|
||||||
|
],
|
||||||
|
"license": "MIT",
|
||||||
|
"keywords": [
|
||||||
|
"jquery",
|
||||||
|
"javascript",
|
||||||
|
"color",
|
||||||
|
"picker",
|
||||||
|
"colorpicker",
|
||||||
|
"mobile",
|
||||||
|
"WCAG2.0",
|
||||||
|
"requestAnimationFrame"
|
||||||
|
],
|
||||||
|
"homepage": "https://github.com/PitPik/tinyColorPicker",
|
||||||
|
"moduleType": [
|
||||||
|
"globals"
|
||||||
|
],
|
||||||
|
"ignore": [
|
||||||
|
"**/.*",
|
||||||
|
"node_modules",
|
||||||
|
"bower_components",
|
||||||
|
"test",
|
||||||
|
"tests"
|
||||||
|
],
|
||||||
|
"dependencies": {
|
||||||
|
"jQuery": "^2.2.1"
|
||||||
|
}
|
||||||
|
}
|
@ -12,6 +12,8 @@
|
|||||||
<link id="colorPickerMod" rel="stylesheet" type="text/css" href="mod.css">
|
<link id="colorPickerMod" rel="stylesheet" type="text/css" href="mod.css">
|
||||||
<script src="http://code.jquery.com/jquery-1.11.2.min.js"></script>
|
<script src="http://code.jquery.com/jquery-1.11.2.min.js"></script>
|
||||||
<script type="text/javascript" src="../jqColorPicker.min.js"></script>
|
<script type="text/javascript" src="../jqColorPicker.min.js"></script>
|
||||||
|
<!-- <script type="text/javascript" src="../colors.js"></script> -->
|
||||||
|
<!-- <script type="text/javascript" src="../jqColorPicker.js"></script> -->
|
||||||
<script type="text/javascript" src="index.js"></script>
|
<script type="text/javascript" src="index.js"></script>
|
||||||
|
|
||||||
<title>tiny jQuery color picker demo</title>
|
<title>tiny jQuery color picker demo</title>
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
<div id="content-wrapper">
|
<div id="content-wrapper">
|
||||||
<h1>Tiny jQuery colorPicker</h1>
|
<h1>Tiny jQuery colorPicker</h1>
|
||||||
<p>Looking for mobile first, tiny foot print, fast, scaleable, flexible and pluggable...<br>
|
<p>Looking for mobile first, tiny foot print, fast, scaleable, flexible and pluggable...<br>
|
||||||
This <strong>4.7KB</strong> small HSB color picker is based on a subset of <a href="https://github.com/PitPik/colorPicker/blob/master/colors.js">colors.js</a> from it's big brother <a href="http://dematte.at/colorPicker/">colorPicker</a>, supports all modern features like touch and MS pointer, GPU accelerated rendering, battery friendly requestAnimationFrame and provides a lot of hooks for developers to write plugins (See demo plugins below in <a href="#demo">Demo</a>).</p>
|
This <strong>4.7KB</strong> (gZip) small HSB color picker is based on a subset of <a href="https://github.com/PitPik/colorPicker/blob/master/colors.js">colors.js</a> from it's big brother <a href="http://dematte.at/colorPicker/">colorPicker</a>, supports all modern features like touch and MS pointer, GPU accelerated rendering, battery friendly requestAnimationFrame and provides a lot of hooks for developers to write plugins (See demo plugins below in <a href="#demo">Demo</a>).</p>
|
||||||
<a name="demo" id="demo" class="a-inline"></a>
|
<a name="demo" id="demo" class="a-inline"></a>
|
||||||
<h2>Demo</h2>
|
<h2>Demo</h2>
|
||||||
On all elements with className 'color': <pre>$('.color').colorPicker();</pre>
|
On all elements with className 'color': <pre>$('.color').colorPicker();</pre>
|
||||||
|
6
index.js
6
index.js
@ -534,9 +534,9 @@
|
|||||||
'.cp-alpha:after{', '.cp-alpha:after, .cp-rgb-r:after, .cp-rgb-g:after, .cp-rgb-b:after{') +
|
'.cp-alpha:after{', '.cp-alpha:after, .cp-rgb-r:after, .cp-rgb-g:after, .cp-rgb-b:after{') +
|
||||||
|
|
||||||
'.cp-rgb-r:after{content:"R";}.cp-rgb-g:after{content:"G";}.cp-rgb-b:after{content:"B";}' +
|
'.cp-rgb-r:after{content:"R";}.cp-rgb-g:after{content:"G";}.cp-rgb-b:after{content:"B";}' +
|
||||||
'div.cp-rgb-r{background:linear-gradient(to right, rgba(220,220,220,1) 0%,rgba(255,0,0,1) 100%);}' +
|
'div.cp-rgb-r{background-color: red;}' +
|
||||||
'div.cp-rgb-g{background:linear-gradient(to right, rgba(220,220,220,1) 0%,rgba(0,255,0,1) 100%);}' +
|
'div.cp-rgb-g{background-color: green;}' +
|
||||||
'div.cp-rgb-b{background:linear-gradient(to right, rgba(220,220,220,1) 0%,rgba(0,0,255,1) 100%);}',
|
'div.cp-rgb-b{background-color: blue;}',
|
||||||
|
|
||||||
|
|
||||||
renderCallback: function($elm, toggled) {
|
renderCallback: function($elm, toggled) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
(function (factory) {
|
(function (factory) {
|
||||||
if (typeof define === 'function' && define.amd) {
|
if (typeof define === 'function' && define.amd) {
|
||||||
define(['jquery', './colors'], function (jQuery, Colors) {
|
define(['jquery', 'colors'], function (jQuery, Colors) {
|
||||||
return factory(window, jQuery, Colors);
|
return factory(window, jQuery, Colors);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user