I need to hide "show replies" when I click to show them. Problem is that when I click "show replies" all "show replies" buttons hides. I need to hide only that the one I click. This is the jQuery code:
$(".replies_show") selects all elements having the class, therefore you are selecting all of them and then applying
replaceWith to all of them again. However,
this inside that call back function refers to the element that just clicked (i.e. the only clicked element not all of them).
Also, do not use
replaceWith function just to hide an element, use