How to use perfect-scrollbar on dynamiclly created elements
<p>I'm using perfect-scrollbar with some dynamically generated elements</p>

<p>I used "DOMNodeInserted" event to do that </p>

<pre><code>$(document).bind('DOMNodeInserted', function (event) {
        $('.scrollable,.k-grid-content,.portlet-body').perfectScrollbar();
    });
</code></pre>

<p>but I got this error</p>

<blockquote>
  <p>perfect-scrollbar.jquery.min.js:2 Uncaught RangeError: Maximum call
  stack size exceeded.</p>
</blockquote>

<p>How can I fix this error?</p>

<p>Is there another way to get perfect-scrollbar to work on dynamically generated elements?</p>

<p>thank you</p>