title: [jQuery]All jQuery interactions stopped with a #div after HTML change with $(div).html()
body: <p>I'm doing a gallery working on tags for a project, using jQuery and Ajax/PHP.
  To do this, I have a container with lists of tags. By clicking on a button, it displays a list by hiding an other (fadingIn/Out). The elements of my lists moves randomly, by clicking on a li element, it adds it on a tag bar and remove it from the list, by clicking on it again in the tag bar, it removes it from it and add it to the list he was from.
  My problem comes from removing a tag from the bar. When I do so, the list animations stops, the tags are no more clickable.</p>
  
  <p>Here is the HTML tagbar part : </p>
  
  <pre><code>        &lt;ul id="tagsBar"&gt;
          &lt;li id="BTag1" class="tagContainer"&gt;
              &lt;div id="" class="tagDeco"&gt;&lt;/div&gt;
  
              &lt;div class="delTag"&gt;
                  Retirer le Tag
              &lt;/div&gt;
          &lt;/li&gt;
  
          &lt;li id="BTag2" class="tagContainer"&gt;
              &lt;div id="" class="tagDeco"&gt;&lt;/div&gt;
  
              &lt;div class="delTag"&gt;
                  Retirer le Tag
              &lt;/div&gt;
          &lt;/li&gt;
  
          &lt;li id="BTag3" class="tagContainer"&gt;
              &lt;div id="" class="tagDeco"&gt;&lt;/div&gt;
  
              &lt;div class="delTag"&gt;
                  Retirer le Tag
              &lt;/div&gt;
          &lt;/li&gt;
  
          &lt;li id="BTag4" class="tagContainer"&gt;
              &lt;div id="" class="tagDeco"&gt;&lt;/div&gt;
  
              &lt;div class="delTag"&gt;
                  Retirer le Tag
              &lt;/div&gt;
          &lt;/li&gt;
  
          &lt;li id="BTag5" class="tagContainer"&gt;
              &lt;div id="" class="tagDeco"&gt;&lt;/div&gt;
  
              &lt;div class="delTag"&gt;
                  Retirer le Tag
              &lt;/div&gt;
          &lt;/li&gt;
      &lt;/ul&gt;
  </code></pre>
  
  <p>And the lists part : </p>
  
  <pre><code>&lt;div class='cloudsWord'&gt;
     &lt;div class="tags" id="Bgenre"&gt;
         &lt;ul id='LISTgenre'&gt;
             &lt;li&gt;blabla&lt;/li&gt;
         &lt;/ul&gt;
     &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The jQuery part : </p>
  
  <pre><code>function addTags() {
  $('.cloudsWord ul li').each(function() {
      animateDiv($(this));
  });
  var working = false;
  $(".tags ul li").click(function() {
  
      if (working) return;
      working = true;
      var tag = $(this).text();
      var tagList = $(this).closest("ul").attr("id");
      $(".tagContainer").each(function() {
          if ($("&gt; .tagDeco", this).text() === "" &amp;&amp; $("&gt; .tagDeco", this).attr('id') === "")    {
              $("&gt; .tagDeco", this).attr('id', "BAR" + tagList).html(tag);
              $('&gt; .tagDeco', this).fadeIn();
              $(this).css({
                  'box-shadow': ' inset 0px 4px 8px rgba(0,0,0,0.45)'
              });
              return false;
          }
      });
      $(this).remove();
      $(document).trigger('tagUpdate');
      working = false;
  });
  }
  function delTags() {
  var working = false;
  $(".tagContainer").click(function() {
      if (working) return;
      working = true;
      var TagToReplace = $('&gt; .tagDeco', this).text();
      var tagList = "#" + $('&gt; .tagDeco', this).attr('id').slice(3);
      var random = 1 + Math.floor(Math.random() * 5);
      var tagSize = "tag" + random;
      var liElement = "&lt;li&gt;&lt;a class=\"" + tagSize + "\" href=\"javaScript:void(0);\"&gt;" + TagToReplace + "&lt;/a&gt;&lt;/li&gt;";
      var html = $(tagList).html() + liElement;
  
      if ($('&gt; .tagDeco', this).attr('id') !== "" &amp;&amp; $('&gt; .tagDeco', this).text() !== "") {
          $(this).css({
              'box-shadow': ' inset 0px 0px 0px rgba(0,0,0,0.45)'
          });
          $('&gt; .tagDeco', this).fadeOut();
          $('&gt; .delTag', this).fadeOut();
          $('&gt; .tagDeco', this).attr("id", "").html("");
          $(tagList).html(html);
      }
      working = false;
  $(document).trigger('tagUpdate');
  });
  }
  </code></pre>
  
  <p>I can't find where I screwed up, feel free to help :P
  Thanks very much to whoever will take the time to help me :) I'll try to do a fiddle if needed.</p>