]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Issue #7441 Enable non-list elements in Accordions
authorAaron Arney <ocularrhythm@users.noreply.github.com>
Wed, 9 Dec 2015 22:16:09 +0000 (17:16 -0500)
committerAaron Arney <ocularrhythm@users.noreply.github.com>
Wed, 9 Dec 2015 22:16:09 +0000 (17:16 -0500)
Instead of selecting an `li` element, I set the selector to `accordion-item`. I tested using nested div elements instead of a list and it worked correctly.

js/foundation.accordion.js

index 336fe7d229c98de465673210c58e1c319e1e0b17..56eb8d0e8da18708c5764d0c105281a307ad4b52 100644 (file)
@@ -55,7 +55,7 @@
    */
   Accordion.prototype._init = function() {
     this.$element.attr('role', 'tablist');
-    this.$tabs = this.$element.children('li');
+    this.$tabs = this.$element.children('.accordion-item');
     this.$tabs.each(function(idx, el){
 
       var $el = $(el),