Browse Source

Observe changes now groups related mutations

pull/2034/head
jlukic 9 years ago
parent
commit
35de853327
1 changed files with 4 additions and 1 deletions
  1. 5
      src/definitions/behaviors/visibility.js

5
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,

Loading…
Cancel
Save