]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Just a quick IE9 IE10 wrap 9126/head
authorCorey Snyder <corey@tangerineindustries.com>
Tue, 1 Nov 2016 14:36:40 +0000 (10:36 -0400)
committerGitHub <noreply@github.com>
Tue, 1 Nov 2016 14:36:40 +0000 (10:36 -0400)
so no errors are thrown to the console, also, no need for a timer on mutate, it is only fired once.

js/foundation.util.triggers.js

index 7e13de64d51ae43152ed1524c4633206ec45078b..b9cbfda4fa380ebd658dd76bca328566c0939d60 100644 (file)
@@ -152,21 +152,13 @@ function scrollListener(debounce){
 }
 
 function mutateListener(debounce) {
-    let timer,
-        $nodes = $('[data-mutate]');
-    if ($nodes.length) {
-        if (timer) {
-          clearTimeout(timer);
-        }
-
-        timer = setTimeout(function () {
-               
+    let $nodes = $('[data-mutate]');
+    if ($nodes.length && MutationObserver){
                        //trigger all listening elements and signal a mutate event
+      //no IE 9 or 10
                        $nodes.each(function () {
                          $(this).triggerHandler('mutateme.zf.trigger');
                        });
-                 
-        }, debounce || 10); //default time to emit scroll event
     }
  }