From 35de853327ba7d81cb5f14b4af2b6beaeaa1a399 Mon Sep 17 00:00:00 2001 From: jlukic Date: Wed, 18 Mar 2015 18:28:33 -0400 Subject: [PATCH] Observe changes now groups related mutations --- src/definitions/behaviors/visibility.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/definitions/behaviors/visibility.js b/src/definitions/behaviors/visibility.js index ab3910161..2f1dbe2d6 100644 --- a/src/definitions/behaviors/visibility.js +++ b/src/definitions/behaviors/visibility.js @@ -120,7 +120,10 @@ $.fn.visibility = function(parameters) { if('MutationObserver' in window) { observer = new MutationObserver(function(mutations) { module.verbose('DOM tree modified, updating visibility calculations'); - module.refresh(); + module.timer = setTimeout(function() { + module.verbose('DOM tree modified, updating sticky menu'); + module.refresh(); + }, 100); }); observer.observe(element, { childList : true,