]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
updates reInit method to hyphenate a plugin class name if they are passed as CamelCas...
authorChris Oyler <chris@zurb.com>
Mon, 1 Feb 2016 22:08:07 +0000 (14:08 -0800)
committerChris Oyler <chris@zurb.com>
Mon, 1 Feb 2016 22:08:07 +0000 (14:08 -0800)
js/foundation.core.js

index 8154355ec47926f5b6c6eebd27ea8456badfb91c..978573d026e68bcb679dcf3dcd8a5c60ab7fabba 100644 (file)
@@ -107,10 +107,12 @@ var Foundation = {
          fns = {
            'object': function(plgs){
              plgs.forEach(function(p){
+               p = hyphenate(p);
                $('[data-'+ p +']').foundation('_init');
              });
            },
            'string': function(){
+             plugins = hyphenate(plugins);
              $('[data-'+ plugins +']').foundation('_init');
            },
            'undefined': function(){