title: Clickable colour boxes to change chat bubble colour
body: <p>I have a chat application where a user can submit a message and the message appears in a chat bubble with an orange background. I've created 5 coloured div boxes which I want to link to the background colour of the chat bubble. My hope is that the user can click on one of the coloured div's and their following messages would appear in a chat bubble with that background. How could I do this?</p>
  
  <p>See link for illustration: <a href="http://imgur.com/D9ZsErP" rel="nofollow">http://imgur.com/D9ZsErP</a></p>
  
  <p>CODE:</p>
  
  <p>HTML: 
      </p>
  
  <pre><code>&lt;/ul&gt;
  
  &lt;div&gt;
  
  &lt;input type="text" id="typetextbox" /&gt;
  
  &lt;button type="submit" id="submit"&gt; &lt;/button&gt;
  
  
  &lt;/div&gt; 
  
  &lt;div&gt;&lt;img src="Images/brown-block.png" id="Brown"/&gt;&lt;/div&gt;
  &lt;div&gt;&lt;img src="Images/blue-block.png" id="Blue" /&gt;&lt;/div&gt;
  &lt;div&gt;&lt;img src="Images/red-block.png" id="Red" /&gt;&lt;/div&gt;
  &lt;div&gt;&lt;img src="Images/green-block.png" id="Green"/&gt;&lt;/div&gt;
  &lt;div&gt;&lt;img src="Images/orange-block.png" id="Orange"/&gt;&lt;/div&gt;
  </code></pre>
  
  <p><del>JAVA</del>JAVASCRIPT: </p>
  
  <pre><code>$('#typetextbox').keypress(function (e){
   if(e.keyCode == 13 ) $('#submit').click();
  });
  
  $('#submit').click(function(){
    var message = $('#typetextbox').val();
    if (message.replace(/ /g, '')){
        var positions = makeNewPosition();
        var el = $('&lt;li&gt;'+message+'&lt;/li&gt;');
        $('#messagebox').append(el);
  </code></pre>
  
  <p>CSS: </p>
  
  <pre><code>li {
      height:auto;
      width:auto;
      background: #E99D41;
      position: absolute;
      background-opacity: 50%;
      font-family:  Helvetica, sans-serif;
      color: #FFF;
  
  #Blue{
      position: absolute;
      top: 88%;
      left: 25%;      
  }
  </code></pre>
  
  <p>#Brown, #Red, #Green, and #Orange all same as #Blue.</p>
  
  <p>I hope this all makes sense, and I'm sure its a pretty simple thing, but I would really appreciate the help!</p>
  
  <p>Thanks </p>