javascript math, list, and click feature
<p><a href="http://jsfiddle.net/mGGPu/" rel="nofollow">http://jsfiddle.net/mGGPu/</a></p>

<p>What I am trying to do is when clicked on the Select Button, the item name will go into cart as well as the price of the item. Then when adding more items, javascript will do the math of the overall "price" owed.</p>

<p>Also would want, after clicking the button it becomes disabled.</p>

<pre><code>&lt;div class="itemWrapper"&gt;
   &lt;div id="item1" class="item"&gt;
      &lt;span class="title"&gt;Item 1&lt;/span&gt;&lt;br /&gt;
      &lt;span class="image"&gt;&lt;img src="http://www.thinkgeek.com/images/products/zoom/tqualizer_anim.gif" /&gt;&lt;/span&gt;&lt;br /&gt;
      &lt;div class="descrip"&gt;
         &lt;span class="points"&gt;1000 pts&lt;/span&gt;&lt;span class="sale"&gt;ON SALE&lt;/span&gt;&lt;br /&gt;
         &lt;span class="description"&gt;Here would be a simple description of the item for sale. 
         Then We will create a button below.&lt;/span&gt;
      &lt;/div&gt;
   &lt;/div&gt;
   &lt;input type="submit" class="button2" value="Add To Cart" /&gt;
&lt;/div&gt;
&lt;div class="cartWrapper" /&gt;
&lt;div class="cart" id="cartj"&gt;
   &lt;div class="cart_body"&gt;
      &lt;div class="cart_title"&gt;Shopping Cart&lt;/div&gt;
      &lt;div class="cart_items"&gt;
         &lt;ul&gt;
            &lt;li&gt;&lt;/li&gt;
         &lt;/ul&gt;
      &lt;/div&gt;
   &lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>Can someone help me? Not sure if this code was the best to use</p>

<pre><code>$('.button2').on('click', function() {
  $(this).closest('.title').css("color","red");
});
</code></pre>

<p>That was just testing the click of button and to change the title color. That was just a test code, kind of like a follow through to see if the click function was working. Though it didn't.</p>

<p>Maybe this for making the item go into cart?</p>

<pre><code>(function($){
$(function(){ $('.button2').click(function();var   
 innerTxt=$(this).text();innerTxt=$.trim(innerTxt);var $obj=
 $('.cart_items li');$obj.val($obj.val()+innerTxt);})}); })(jQuery);​​​
</code></pre>

<p>Though its not complete. I'm running on like no sleep, and am brain dead today.</p>
