tap/app/assets/javascripts/remove_button.js

12 lines
252 B
JavaScript
Raw Normal View History

2015-10-26 17:57:59 +00:00
ready = function() {
$('[data-remove]').each(function() {
var button = $(this);
setTimeout(function() {
$(button).remove();
}, $(button).data("remove") * 1000);
});
}
$(document).ready(ready);
$(document).on('page:load', ready);