title: How to add dynamic css class with active property attached to button
body: <p>How to add following css class dynamically to a button.</p>
  
  <pre><code>.custom-button:active{
      background-image: url('images/pressed.jpg') !important;
  }
  </code></pre>
  
  <p>i created a lot of buttons in java-script using the following code. The buttons already have a class .custom-button button without the property (active).</p>
  
  <pre><code>var ItemsToAdd = '';
  ItemsToAdd += '&lt;a id="' + id + '" data-role="button" style="background-image:url('+ img_path_normal +');border-width:0px;" class="custom-button" &gt;&lt;/a&gt;';                
  $("#container2").append(ItemsToAdd);
  </code></pre>
  
  <p>the class that i already added using java script is following:</p>
  
  <pre><code>.custom-button {
      height: 150px !important; 
      width: 120px;
      background-size:100% 100%;
      border:0px;
      border-radius:0px;
      border-style:none;
      padding:0px;
      margin:0px;
      border-width:0px;
  }
  </code></pre>