Permalink
Browse files

Add more info to index

  • Loading branch information...
bebraw committed Jul 5, 2012
1 parent 9123e7d commit 97eb79ef77ba1d8b8f355b29909b88ec98b8a283
Showing with 39 additions and 0 deletions.
  1. +38 −0 index.html
  2. +1 −0 pu.sh
View
@@ -56,6 +56,44 @@ <h2>RGB Picker</h2>
<div id="rgbPicker"></div>
+ <h2>Usage</h2>
+
+ <pre class="highlight"><span class="kd">var</span> <span class="nx">joe</span> <span class="o">=</span> <span class="nx">colorjoe</span><span class="p">(</span><span class="nx">element_id_or_dom_object</span><span class="p">,</span> <span class="nx">initial_color_value</span><span class="p">);</span>
+</pre>
+
+<p>or</p>
+
+ <pre class="highlight"><span class="kd">var</span> <span class="nx">joe</span> <span class="o">=</span> <span class="nx">rgbjoe</span><span class="p">(</span><span class="nx">element_id_or_dom_object</span><span class="p">,</span> <span class="nx">initial_color_value</span><span class="p">);</span>
+</pre>
+
+ <p>The returned joe object is an event emitter style object with
+ <code>change</code> and
+ <code>done</code> events. The <code>change</code> event is fired continuously when selecting and done
+ is fired when user has stopped selecting.</p>
+
+ <pre class="highlight"><span class="nx">joe</span><span class="p">.</span><span class="nx">on</span><span class="p">(</span><span class="s2">&quot;change&quot;</span><span class="p">,</span> <span class="kd">function</span><span class="p">(</span><span class="nx">color</span><span class="p">)</span> <span class="p">{</span>
+ <span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="s2">&quot;Selecting &quot;</span> <span class="o">+</span> <span class="nx">color</span><span class="p">.</span><span class="nx">toCSS</span><span class="p">());</span>
+<span class="p">});</span>
+
+<span class="nx">joe</span><span class="p">.</span><span class="nx">on</span><span class="p">(</span><span class="s2">&quot;done&quot;</span><span class="p">,</span> <span class="kd">function</span><span class="p">(</span><span class="nx">color</span><span class="p">)</span> <span class="p">{</span>
+ <span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="s2">&quot;Selected &quot;</span> <span class="o">+</span> <span class="nx">color</span><span class="p">.</span><span class="nx">toCSS</span><span class="p">());</span>
+<span class="p">});</span>
+</pre>
+
+ <p>The color object is from <a href="http://bebraw.github.com/colorjs/">colorjs</a>.</p>
+
+ <h2>Contributors</h2>
+
+ <ul>
+ <li><a href="https://github.com/bebraw">Juho Vepsäläinen</a> - Core</li>
+ <li><a href="https://github.com/epeli">Esa-Matti Suuronen</a> -<a href="https://github.com/cowboy/grunt">Grunt</a> support</li>
+ </ul>
+
+ <h2>License</h2>
+
+ <p>colorjoe is available under MIT. See <a
+ href="https://github.com/bebraw/colorjoe/blob/master/LICENSE">LICENSE</a> for more details.</p>
+
</section>
</div>
<footer>
View
1 pu.sh
@@ -1,3 +1,4 @@
git push
git push origin master:gh-pages
+git push --tags

0 comments on commit 97eb79e

Please sign in to comment.