diff --git a/javascript/CommentsInterface.js b/javascript/CommentsInterface.js
index 255b517..ba37e0d 100755
--- a/javascript/CommentsInterface.js
+++ b/javascript/CommentsInterface.js
@@ -79,20 +79,25 @@
* Toggle on/off reply form
*/
$( ".comment-reply-link" ).entwine({
- onclick: function( e ) {
- var allForms = $( ".comment-reply-form-holder" ),
- formID = $( this ).prop('href').replace(/^[^#]*#/, '#'),
+ onclick: function( e ) {
+ var allForms = $( ".comment-reply-form-holder" ),
+ formID = '#' + $( this ).attr('aria-controls');
form = $(formID).closest('.comment-reply-form-holder');
- // Prevent focus
- e.preventDefault();
- if(form.is(':visible')) {
- allForms.slideUp();
- } else {
- allForms.not(form).slideUp();
+ $(this).attr('aria-expanded', function (i, attr) {
+ return attr == 'true' ? 'false' : 'true'
+ });
+
+ // Prevent focus
+ e.preventDefault();
+
+ if(form.is(':visible')) {
+ allForms.slideUp();
+ } else {
+ allForms.not(form).slideUp();
form.slideDown();
- }
- }
+ }
+ }
});
diff --git a/templates/Includes/CommentsInterface_singlecomment.ss b/templates/Includes/CommentsInterface_singlecomment.ss
index 0b185ed..7e34af6 100755
--- a/templates/Includes/CommentsInterface_singlecomment.ss
+++ b/templates/Includes/CommentsInterface_singlecomment.ss
@@ -33,7 +33,9 @@
<% end_if %>
<% if $RepliesEnabled && $canPostComment %>
-
+
<% end_if %>
<% end_if %>