diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-05-14 16:45:56 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-05-14 16:45:56 +0000 |
commit | 336d35e29915c2d7be0846bdfb48632ba99d18dd (patch) | |
tree | 2718db42cd691ad9abaffb03ef7cca42dbda1f50 /misc | |
parent | 24db763b78cdf6509a33c1312996b633ffcdcf36 (diff) | |
download | brdo-336d35e29915c2d7be0846bdfb48632ba99d18dd.tar.gz brdo-336d35e29915c2d7be0846bdfb48632ba99d18dd.tar.bz2 |
- Patch #535966 by casey, jablko: add ':target' to selector for removing 'collapsed' class.
Diffstat (limited to 'misc')
-rw-r--r-- | misc/collapse.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/misc/collapse.js b/misc/collapse.js index fddc9a61f..28b3090ee 100644 --- a/misc/collapse.js +++ b/misc/collapse.js @@ -60,7 +60,8 @@ Drupal.behaviors.collapse = { var $fieldset = $(this); // Expand fieldset if there are errors inside, or if it contains an // element that is targeted by the uri fragment identifier. - if ($('.error, :target', $fieldset).length) { + var anchor = location.hash && location.hash != '#' ? ', ' + location.hash : ''; + if ($('.error' + anchor, $fieldset).length) { $fieldset.removeClass('collapsed'); } |