summaryrefslogtreecommitdiff
path: root/misc/collapse.js
diff options
context:
space:
mode:
Diffstat (limited to 'misc/collapse.js')
-rw-r--r--misc/collapse.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/misc/collapse.js b/misc/collapse.js
index bd51ce532..512ff2f9f 100644
--- a/misc/collapse.js
+++ b/misc/collapse.js
@@ -58,9 +58,9 @@ Drupal.behaviors.collapse = {
$('fieldset.collapsible', context).once('collapse', function () {
var $fieldset = $(this);
// Expand fieldset if there are errors inside, or if it contains an
- // element that is targeted by the URI fragment identifier.
+ // element that is targeted by the URI fragment identifier.
var anchor = location.hash && location.hash != '#' ? ', ' + location.hash : '';
- if ($('.error' + anchor, $fieldset).length) {
+ if ($fieldset.find('.error' + anchor).length) {
$fieldset.removeClass('collapsed');
}