mirror of
https://github.com/PitPik/tinyColorPicker
synced 2025-06-27 13:11:01 -06:00
Minor updates
This commit is contained in:
parent
8e338c8e7e
commit
0bfa3f10b2
@ -66,7 +66,7 @@ $('.color').colorPicker({
|
||||
|
||||
The positionCallback can be used to optionally position the colorPicker different from its default; in case you want it to also show above or to the left of the input field etc.
|
||||
The callback will also be called on scroll.
|
||||
You need to return an object that holds ```left``` and ```top``` to position the colorPicker. See ./demo/index.js for an example:
|
||||
If you return an object (```{left: x, top: y}``` to position the colorPicker) then those coordinates will be taken, otherwhise the function just executes (what you need to do: re-append for example) and it takes the internal algorithm to position the color picker. See ./demo/index.js for an example:
|
||||
|
||||
```javascript
|
||||
positionCallback: function($elm) {
|
||||
|
@ -31,7 +31,7 @@
|
||||
Colors = function(options) {
|
||||
this.colors = {RND: {}};
|
||||
this.options = {
|
||||
color: 'rgba(204, 82, 37, 0.8)', // init value(s)...
|
||||
color: 'rgba(0,0,0,0)', // init value(s)...
|
||||
grey: grey,
|
||||
luminance: luminance,
|
||||
valueRanges: _valueRanges
|
||||
|
@ -25,7 +25,7 @@
|
||||
<div id="content-wrapper">
|
||||
<h1>Tiny jQuery colorPicker</h1>
|
||||
<p>Looking for mobile first, tiny foot print, fast, scaleable, flexible and pluggable...<br>
|
||||
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>
|
||||
This <strong>5.07KB</strong> (gZip; 11.39KB minified) 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>
|
||||
<h2>Demo</h2>
|
||||
On all elements with className 'color': <pre>$('.color').colorPicker();</pre>
|
||||
|
File diff suppressed because one or more lines are too long
4
jqColorPicker.min.js
vendored
4
jqColorPicker.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user