Menubar - Use class instead of id for flexibility
authorColeman Watts <coleman@civicrm.org>
Thu, 18 Jul 2019 12:41:48 +0000 (08:41 -0400)
committerColeman Watts <coleman@civicrm.org>
Thu, 18 Jul 2019 12:41:48 +0000 (08:41 -0400)
js/crm.menubar.js

index ed5eb920ee600ff5fea5c225bf2c26016f2a4d05..3dcc3f1de2e2bdb62f453c70cd3be44f7c55787d 100644 (file)
 
       // Wait for crm-container present on the page as it's faster than document.ready
       function insert(markup) {
-        if ($('#crm-container').length) {
+        if ($('.crm-container').length) {
           render(markup);
         } else {
           new MutationObserver(function(mutations, observer) {
             _.each(mutations, function(mutant) {
               _.each(mutant.addedNodes, function(node) {
-                if ($(node).is('#crm-container')) {
+                if ($(node).is('.crm-container')) {
                   render(markup);
                   observer.disconnect();
                 }