title: JQuery Change Class Not Working
body: <p>I have try to create "expand-unexpand" function using JQuery. When user click expand, than the child of the div appear. And when the user click unexpand, the child of the div disappear. But it doesn't work.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>$(document).ready(function(){
  $('.expand').click(function(){
      var id = $(this).attr('id');
  
      $(this).html("-");
      $(this).attr("class", "unexpand");
  
      $.post("classes/ajax_laporan.php",
              {
                  id: id
              },
              function(data){
              }
      );
  });
  
  $('.unexpand').click(function(){
     $(this).html("+");
     $(this).attr("class", "expand");
  });
  })
  </code></pre>
  
  <p>Is there anyone can help me solve this problem? Thanks in advance.</p>