When user clicks on Reply button for a specific comment, how can I then hide the reply button under said comment? Do I have any access to the javascript onclick function that it calls?
Leave a Reply
You must be logged in to post a comment.
When user clicks on Reply button for a specific comment, how can I then hide the reply button under said comment? Do I have any access to the javascript onclick function that it calls?
You must be logged in to post a comment.
Ended up using jQuery to solve this. The form moves around using javascript anyways so it doesn’t break anything for users with js turned off.
You can “wrap” the function by renaming it and defining your own function with the same name, that calls the renamed function. The “cancel” handler is internal, so you can’t access that.
You could also unregister the
comment-reply
Javascript, and register your own version. Or you can hook up extra handlers to the click event, with plain Javascript or with jQuery, as you have done.