title: Jquery is resetting after dynamic changes
body: <p>I have a chartist.js bar graph. I want to customize x-axis labels. I wrote some following jquery for flipping first and last name and then add '...' at the end if the length of the text is more than 11 characters.</p>
  
  <pre><code>$(function () {
          $('#AssignedLineChart .ct-labels, #ResolvedBarChart .ct-labels').find('.ct-label.ct-horizontal').each(function () {
              var label = $(this).text();
              var splitLabel = label.split(",");
              var newLabel = splitLabel[1] + ", "+splitLabel[0];
              if (newLabel.length &gt; 13) {
                  newLabel = newLabel.substring(0, 10) + "...";
              }
              $(this).text(newLabel);
          });
      });
  </code></pre>
  
  <p>It applied fine when I load the page first time. There are some select options on bar charts for displaying individual ranges. When I select them the labels go back to their previous state. Selecting options are changing DOM. This also happens when I open inspect element tab.</p>
  
  <p>Is there a way to use find or each method on dynamically changed elements? </p>