title: Javascript in Assets not working after Rendering Partial in js.erb Ruby on Rails
body: <p>Question similar to mine are asked before but here the scenario is bit different - I have a <code>js.erb</code> file in which I'm publishing using (<code>private_pub</code>) a partial like below</p>
  
  <pre><code>&lt;% publish_to "/conversation/update_waiter" do %&gt;
     $("#online_waiters").replace_html('&lt;%= j(render :partial =&gt; "/restaurants/online_waiters")%&gt;');     
  &lt;% end %&gt;
  </code></pre>
  
  <p>the partial is rendered on all users wall successfully and no extra or duplicate <code>div</code>s are generated . But on <code>click</code> function (which is an <code>anchor</code> in newly rendered partial) stops working . While its functionality is defined in /assets/js . Now after showing that partial on users if i refresh the page , then the same partial which is displayed due to my cookies , works fine . Any help or idea will be appreciated</p>