Idea: I want to disable js script on specific page(e.g new_post_path), that is placed in application.js. On another page script should works. Have you any idea how to solve this problem? I thought to use loop unless current_page?(new_post_path), but it's not work in js file.
Simple script to disable:
window.setTimeout(function() {
$(".alert").fadeTo(500, 0).slideUp(500, function() {
$(this).remove();
});
}, 10000);
end