The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Fixing reply on every post button.

Go down

Fixing reply on every post button. Empty Fixing reply on every post button.

Post by puppycheese June 23rd 2013, 10:53 pm

I used a tutorial that made it so there would be a reply button for every post and it would open up a quick reply editor when you press it and you could respond to the post like that.

So I have this code from MR.EasyBB And it adds a reply button to each post. is their a way to fix this? 

Here is the code
Code:
$(function() {
document.getElementById('pun-qpost').style.display='none';
var items = document.getElementsByClassName('entry-content'), replyDiv;
for (var i = 0; i < items.length; i++) {
   replyDiv = document.createElement('div');
   replyDiv.className='replyButton';
   replyDiv.innerHTML = 'Reply';
   items[i].appendChild(replyDiv);
}
$('.replyButton').click(function() {
    var reply = document.getElementById('pun-qpost'),seeIf = $(this).parent('.entry-content').children('#pun-qpost'),seeIfcheck = seeIf.css('display');
if(seeIf.length == 1 && seeIfcheck ==="block") {
 document.getElementById("pun-qpost").style.display= 'none';
} else if (seeIfcheck ==="none" && seeIf.length == 1){
      document.getElementById("pun-qpost").style.display= 'block';}else{ $(this).parent().append(reply);
 document.getElementById("pun-qpost").style.display= 'block';
}
});
});

Please help me! I used this and I really liked having it on my forums.
puppycheese
puppycheese
Forumember

Posts : 141
Reputation : 2
Language : english

http://www.converseit.net/

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum