 
         notificationClass = ".#{namespace}-notification.open"
         notifications = container.querySelectorAll(notificationClass)
+
         for notification in notifications
-          console.log 'close all is on ', notification.id
-          setTimeout ->
-            notification.querySelector(".#{namespace}-close").click()
-          # , 5
-          , 100
+          ((n, namespace) ->
+            n.querySelector(".#{namespace}-close").click()
+          )(notification, namespace)
         return
   )
+
+  # register the closeAll module
+  notific8(
+    'registerModule'
+    'closeall'
+    'insideContainer'
+    {
+      closeAll: false
+      closeAllText: 'Close All'
+      closeAllTheme: 'legacy'
+      closeAllColor: 'teal'
+    }
+    closeAllCallback
+  )

    { namespace } = data.settings
    container.querySelector(".#{namespace}-closeall-button")

  notific8(
    'registerModule'
    'closeall'
    'insideContainer'
    {
      closeAll: false
      closeAllText: 'Close All'
      closeAllTheme: 'legacy'
      closeAllColor: 'teal'
    }
    closeAllCallback
  )

  notific8(
    'configure'
    onCreate: (notification, data) ->

        closeButton.style.display = 'block'
  )

  # configure the onClose event handler
  notific8(
    'configure'
    onClose: (notification, data) ->
