<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -23,6 +23,17 @@
    //$('#color1').change(function(){
     //alert(&quot;color changed&quot;);
    //});
+
+   $(&quot;#button1&quot;).click(function(){
+    $(&quot;#color1&quot;).val(&quot;#ffffff&quot;);   
+    $(&quot;#color1&quot;).change();
+   });
+
+   $(&quot;#button2&quot;).click(function(){
+    $(&quot;#color2&quot;).val(&quot;#000000&quot;);   
+    $(&quot;#color2&quot;).change();
+   });
+
   });
 &lt;/script&gt;
 
@@ -65,7 +76,14 @@ div.form-container div.controlset label { width: 100px;}
 			&lt;div class=&quot;controlset&quot;&gt;&lt;label for=&quot;color1&quot;&gt;Color 1&lt;/label&gt; &lt;input id=&quot;color1&quot; type=&quot;text&quot; name=&quot;color1&quot; value=&quot;#333399&quot; /&gt;&lt;/div&gt;
 			&lt;div class=&quot;controlset&quot;&gt;&lt;label for=&quot;color2&quot;&gt;Color 2&lt;/label&gt; &lt;input id=&quot;color2&quot; type=&quot;text&quot; name=&quot;color2&quot; value=&quot;#FF0000&quot; /&gt;&lt;/div&gt;
 			&lt;div class=&quot;controlset&quot;&gt;&lt;label for=&quot;color3&quot;&gt;Color 3&lt;/label&gt; &lt;input id=&quot;color3&quot; type=&quot;text&quot; name=&quot;color3&quot; value=&quot;#99cc00&quot; /&gt;&lt;/div&gt;
+
 		&lt;/fieldset&gt;
+  
+    &lt;div class=&quot;buttonrow&quot;&gt;
+      &lt;div&gt;&lt;button type=&quot;button&quot; id=&quot;button1&quot;&gt;Set Color 1 to #FFF&lt;/button&gt;&lt;/div&gt;
+      &lt;div&gt;&lt;button type=&quot;button&quot; id=&quot;button2&quot;&gt;Set Color 2 to #000&lt;/button&gt;&lt;/div&gt;
+    &lt;/div&gt;
+
 	&lt;/form&gt;
 &lt;/div&gt;
 </diff>
      <filename>demo.html</filename>
    </modified>
    <modified>
      <diff>@@ -9,7 +9,8 @@
 (function($){
   $.fn.colorPicker = function(){    
     if(this.length &gt; 0) buildSelector();
-    return this.each(function(i) { buildPicker(this)}); 
+    return this.each(function(i) { 
+      buildPicker(this)}); 
   };
   
   var selectorOwner;
@@ -25,9 +26,16 @@
     
     //add the color picker section
     $(element).after(control);
+
+    //add even listener to input box
+    $(element).bind(&quot;change&quot;, function() {
+      selectedValue = toHex($(element).val());
+      $(element).next(&quot;.color_picker&quot;).css(&quot;background-color&quot;, selectedValue);
+    });
     
     //hide the input box
     $(element).hide();
+
   };
   
   buildSelector = function(){
@@ -61,7 +69,6 @@
 
      $(&quot;body&quot;).append(selector); 
      selector.hide();
-
   };
   
   checkMouse = function(event){</diff>
      <filename>jquery.colorPicker.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>ec028830c312738e4aed26ac06cee33fe81e7f42</id>
    </parent>
  </parents>
  <author>
    <name>lakshan</name>
    <email>lakshan@web2media.net</email>
  </author>
  <url>http://github.com/laktek/really-simple-color-picker/commit/f1c4c494d9e5b3f37844dadef3ae02d1ec0e2909</url>
  <id>f1c4c494d9e5b3f37844dadef3ae02d1ec0e2909</id>
  <committed-date>2009-10-13T18:33:07-07:00</committed-date>
  <authored-date>2009-10-13T18:33:07-07:00</authored-date>
  <message>Color picker will change it's color when the input field value is changed externally</message>
  <tree>1aacbdb9da8075c8a7c5bb78b1a40c5e4fbeefff</tree>
  <committer>
    <name>lakshan</name>
    <email>lakshan@web2media.net</email>
  </committer>
</commit>
