title: how to select a id and class attribute is active in ajax
body: <p>i'd like to get data when the condition is id attribute is manufacture and class attribute is active.</p>
  
  <p>my view :</p>
  
  <pre><code>    &lt;li id="manufacture"&gt;
      &lt;a data-toggle="tab" href="#faq-tab" id="warranty"&gt;Samsung&lt;/a&gt;
  &lt;textarea class="ckeditor" name="description_warranty" style="height: 400px;" rows="3" placeholder="Enter text . . . " &gt;'+data[i].description_warranty+'&lt;/textarea&gt;
      &lt;/li&gt;
  &lt;li id="manufacture" class="active"&gt;
      &lt;a data-toggle="tab" href="#faq-tab" id="warranty"&gt;Apple &lt;/a&gt;
  &lt;textarea class="ckeditor" name="description_warranty" style="height: 400px;" rows="3" placeholder="Enter text . . . " &gt;'+data[i].description_warranty+'&lt;/textarea&gt;
      &lt;/li&gt;
      &lt;li&gt;&lt;button data-toggle="tab" id="btnsaving" onclick="save()" class="btn btn-lg btn-success"&gt;
      &lt;i class="White ace-icon fa fa-save bigger-130"&gt;&lt;/i&gt;Save&lt;/button&gt;
      &lt;/li&gt;
  </code></pre>
  
  <p>Ajax Save() :</p>
  
  <pre><code>    var url;
      if($('#manufacture')) {
          url = "&lt;?php echo base_url('admin-spot/company/AddBranch')?&gt;";
      }else{
          $('#modal_form').modal('show'); // show bootstrap modal
          $('.modal-title').text('WARNING!!!');//modal title
      }
  </code></pre>
  
  <p>any solutions, so when <li> class change to be active  i would create a function to save 
  i just need to get data, if ( and ) and if yes run the other function, if no i show warning modal.</p>