Color Picker & Color Wheel
[raphael] / plugins / jquery.colorwheel.js
1 /*!
2  * Color Wheel 0.1.0 - Raphael plugin
3  *
4  * Copyright (c) 2010 John Weir (http://famedriver.com) & Dmitry Baranovskiy (http://raphaeljs.com)
5  * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
6  */
7 (function ($, R) {
8     $.fn.colorwheel = function (size, initcolor) {
9         if (R) {
10             var offset = this.offset();
11             return R.colorpicker(offset.left, offset.top, size, initcolor, this[0]);
12         }
13         return null;
14     };
15 })(window.jQuery, window.Raphael);