]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Fix the 'aria-expanded' in multi-buttons scenario 6348/head 6350/head
authorAbdullah Salem <abdullahsalem@outlook.com>
Mon, 2 Mar 2015 18:16:54 +0000 (21:16 +0300)
committerAbdullah Salem <abdullahsalem@outlook.com>
Mon, 2 Mar 2015 18:16:54 +0000 (21:16 +0300)
js/foundation/foundation.dropdown.js

index c67bd10627267f8618a6f0fdb2ebb3d7b8b33e3e..076c535c8ef9d7a0bf98c0dc48140b3c6f8bf345 100644 (file)
 
     close : function (dropdown) {
       var self = this;
-      dropdown.each(function () {
-        var original_target = $('[' + self.attr_name() + '=' + dropdown[0].id + ']') || $('aria-controls=' + dropdown[0].id + ']');
+      dropdown.each(function (idx) {
+        var original_target = $('[' + self.attr_name() + '=' + dropdown[idx].id + ']') || $('aria-controls=' + dropdown[idx].id + ']');
         original_target.attr('aria-expanded', 'false');
         if (self.S(this).hasClass(self.settings.active_class)) {
           self.S(this)