title: How can I render a partial from .js.erb file in rails 4?
body: <p>In my rails application I have dragdrop.js.erb in /assets/javascript folder. In which I have an ajax block which should render a partial in a div with an on click action. I tried many things but I can't get it working. Any help would be appreciated.</p>
  
  <p>Here is the code:</p>
  
  <pre><code> $.ajax({  
     type: "GET",    
     url: "&lt;%=  Rails.application.routes.url_helpers.cookbooks_path %&gt;",
     success: function(resp){
    $("#property").load("&lt;%= escape_javascript (render :partial =&gt; 'recipes/package_form') %&gt;") 
     }
  </code></pre>