replacing text in a div with jQuery
<p>I have a textContainer where there will some default text. And there are some clickable text(A,B,C). When a text is clicked it needs to show the text associated with it(pre define in another div) on the textContainer. I found some tutorial which uses next selector to grab the text but chances are that I will need to update text in several containers. So Try to create a function that will do the work and update text in multiple containers(divs) if needed. I hope it make sense(TGIF..)</p>

<pre><code>&lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
$(document).ready(function() {
$(".content").css('display','none');
$(".handler").click(function(){ 
    alert("what what");
  });
 });
&lt;/script&gt;

&lt;body&gt;
&lt;div id="textContainer"&gt;
    &lt;P&gt;This is where the text is update&lt;/P&gt;
&lt;/div&gt;

&lt;div class="handler A" &gt;A&lt;/div&gt;
&lt;div class="handler B" &gt;B&lt;/div&gt;
&lt;div class="handler C" &gt;C&lt;/div&gt;

&lt;div class="content textA"&gt; Text A &lt;/div&gt;
&lt;div  class="content textB"&gt; Text B &lt;/div&gt;
&lt;div  class="content textC"&gt; Text C &lt;/div&gt;
</code></pre>
