title: Change CSS property on click on buttons?
body: <p>Hy,
  Please can any one help me to do this task. i really need it so much.</p>
  
  <p>i want to change the class style of the button (witch is a link) by clicking on it.
  The buttons are contained on a dynamic child div witch will change every time. the name of the dynamic child div will stay the same every time.</p>
  
  <p>Note: Only one single child div will displayed  in the parent div.</p>
  
  <p>This is the style code:</p>
  
  <pre><code>.btn_child              {display:block;  margin:-1px; border:1px solid; background-color:#428bca; border-color:#357ebd; text-align:left; padding-left:15px;  line-height:30px; }
  .btn_child:hover        {background-color:#3276b1; border-color:#285e8e; }
  .btn_child_selected     {background-color:#3276b1; border-color:#285e8e; }
  </code></pre>
  
  <p>This is the html code:</p>
  
  <pre><code>&lt;div id="parent" class="parent_class"&gt; 
  &lt;!--this is a dynamic content and the ID will change. only the name will still the same--&gt;
  &lt;div id="dynamic_child1" name="child"&gt;
  &lt;a class="btn_child" target="_blank" href="" &gt; link1        &lt;/a&gt;
  &lt;a class="btn_child" target="_blank" href="" &gt; link2        &lt;/a&gt;
  &lt;a class="btn_child" target="_blank" href="" &gt; link3        &lt;/a&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>IMPORTANT: By clicking on the next button, the old one will return to default style and the new one style will be changed.</p>
  
  <p>This is a link. it may explain more: <a href="http://jsfiddle.net/c1znyrw5/" rel="nofollow">http://jsfiddle.net/c1znyrw5/</a></p>