Skip to content

Commit

Permalink
attach eventListeners on document.load #9004
Browse files Browse the repository at this point in the history
  • Loading branch information
noi5e committed Jan 19, 2021
1 parent dbdf14b commit b8402a0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/assets/javascripts/comment.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
(function() {

$(function() {
$('.comment-form').each(function() {
if(!$(this).hasClass('bound-success')) {
$(this).addClass('bound-success').on('ajax:success', function(e, data, status, xhr){
Expand Down Expand Up @@ -46,7 +45,7 @@
}

});
}());
});

function insertTitleSuggestionTemplate() {
var element = $('#text-input');
Expand Down

0 comments on commit b8402a0

Please sign in to comment.