Browse Source

Typo fix

buidCallback -> buildCallback
pull/25/head
peterd 7 years ago
parent
commit
238ce7ed87
  1. 2
      README.md
  2. 18
      index.html
  3. 6
      jqColorPicker.js
  4. 2
      jqColorPicker.js.map
  5. 4
      jqColorPicker.min.js

2
README.md

@ -35,7 +35,7 @@ $('.color').colorPicker({
opacity: true, // enable / disable alpha slider
renderCallback: function($elm, toggled) {}, // this === instance; $elm: the input field;toggle === true -> just appeared; false -> opposite; else -> is rendering on pointer move
// toggled true/false can for example be used to check if the $elm has a certain className and then hide alpha,...
buidCallback: function($elm) {}, // this === instance; $elm: the UI
buildCallback: function($elm) {}, // this === instance; $elm: the UI
css: '', // replaces existing css
cssAddon: '', // adds css to existing
margin: '', // positioning margin (can also be set in cssAddon)

18
index.html

@ -63,7 +63,7 @@ As Tiny jQuery colorPicker uses <a href="https://github.com/PitPik/colorPicker/b
<p>The following snipped shows how easy it is to make plugins: use for mobile</p>
<pre style="display: block; overflow: auto;">
window.myColorPicker = $('input.color').colorPicker({
buidCallback: function($elm) {
buildCallback: function($elm) {
$elm.prepend('&lt;div class="cp-disp">&lt;/div>');
},
cssAddon:
@ -95,9 +95,9 @@ window.myColorPicker = $('input.color').colorPicker({
<!-- <script type="text/javascript" src="jquery-1.11.2.js"></script> -->
<script src="http://code.jquery.com/jquery-1.11.2.min.js"></script>
<!-- <script type="text/javascript" src="colors.js"></script> -->
<!-- <script type="text/javascript" src="jqColorPicker.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="jqColorPicker.min.js"></script> -->
<script type="text/javascript">
(function(window, undefined){
'use strict';
@ -128,7 +128,7 @@ window.myColorPicker = $('input.color').colorPicker({
animationSpeed: 0,
// demo on how to make plugins... mobile support plugin
buidCallback: function($elm) {
buildCallback: function($elm) {
$elm.prepend('<div class="cp-disp"></div>');
$('.color').on('click', function(e) {
e.preventDefault && e.preventDefault();
@ -161,7 +161,7 @@ window.myColorPicker = $('input.color').colorPicker({
margin: '4px -2px 0',
doRender: 'div div',
buidCallback: function($elm) {
buildCallback: function($elm) {
var colorInstance = this.color,
colorPicker = this;
@ -223,7 +223,7 @@ window.myColorPicker = $('input.color').colorPicker({
doRender: 'div div',
opacity: false,
buidCallback: function($elm) {
buildCallback: function($elm) {
var colorInstance = this.color,
colorPicker = this,
random = function(n) {
@ -295,7 +295,7 @@ window.myColorPicker = $('input.color').colorPicker({
margin: '4px -2px 0',
doRender: 'div div',
// this demo adds divs with gradiends,... you could simply load an image as well
buidCallback: function($elm) {
buildCallback: function($elm) {
var that = this;
$elm.find('.cp-z-slider').prepend(
@ -507,7 +507,7 @@ window.myColorPicker = $('input.color').colorPicker({
'9ACD32': 'yellowgreen'
},
buidCallback: function($elm) {
buildCallback: function($elm) {
var that = this;
$elm.append('<div class="cp-patch"><div></div></div><div class="cp-disp"></div>');

6
jqColorPicker.js

@ -118,7 +118,7 @@
_$z_cursor = $('.cp-z-cursor', this);
_$alpha = $('.cp-alpha', this).toggle(!!_options.opacity);
_$alpha_cursor = $('.cp-alpha-cursor', this);
_options.buidCallback.call(_colorPicker, $(this));
_options.buildCallback.call(_colorPicker, $(this));
$(this).prepend('<div>').children().eq(0).css('width',
$(this).children().eq(0).width() // stabilizer
);
@ -261,7 +261,7 @@
customBG: '#FFF',
opacity: true,
renderCallback: noop,
buidCallback: noop,
buildCallback: noop,
body: document.body,
scrollResize: true,
gap: 4
@ -294,7 +294,7 @@
}).
on('focus.a click.a', _selector, toggle).
on('change.a', _selector, function() {
_color.setColor(this.value);
_color.setColor(this.value || 'rgb');
_instance.colorPicker.render();
});

2
jqColorPicker.js.map
File diff suppressed because it is too large
View File

4
jqColorPicker.min.js
File diff suppressed because it is too large
View File

Loading…
Cancel
Save