in my index.html.erb I have:
<button type="button" id="clean">Clean</button>
This button is add after by action "something.js.erb". So, in application.js:
$(function () {
$('button#clean').click(function(){
$('#target').remove();
});
});
why is not working? When I put this script into html, it's work.