var postBoxes = document.querySelectorAll('.post-box')
postBoxes.forEach(function(postBox) {
postBox.addEventListener('click', function() {
var postId = this.getAttribute('post-id')
console.log(postId)
document.getElementById('comment-form-' + postId).style.display = 'block'
})
})
var buttons = document.querySelectorAll('.btn-click-me');
for (var i = 0; i < buttons.length; i++) {
var self = buttons[i];
self.addEventListener('click', function (event) {
// prevent browser's default action
event.preventDefault();
// call your awesome function here
MyAwesomeFunction(this); // 'this' refers to the current button on for loop
}, false);
}