title: Set dynamically generated buttons "disabled"
body: <p>I have a chat application based on WebSockets. Next to every message there should be a rating button. I need to prohibit selfratings by setting the corresponting buttons to disabled. The problem is that the messages and their buttons are generated dynamically and the code snippet doesn't work.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(".btn").prop("disabled", true);</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"&gt;&lt;/script&gt;
  &lt;button class="btn"&gt;Click&lt;/button&gt;</code></pre>
  </div>
  </div>
  </p>