title: Adding CSS in AJAX function
body: <p>I have an AJAX function to hide and show fields of a form in HTML. I want to add some CSS in the AJAX function.</p>
  
  <pre><code>&lt;script&gt;
      $(function() {
  
          $('#advo_other').hide();
          $('#advocate').change(function() {
  
              var val = $(this).val();
  
              $('#advo_other').hide();
  
              switch (val) {
                  case 'Other':
                      $('#advocate') // want to add css there......
                      $('#advo_other').show();
                      break; 
              }
          });
      });
  &lt;/script&gt; 
  </code></pre>
  
  <p>and the style is below:</p>
  
  <pre><code>&lt;style type="text/css"&gt;
      .fade {
          color: #CCC;
          border-color:#CCC;
      }
  &lt;/style&gt;
  </code></pre>