span.className = 'icon icon24 fa-ellipsis-v';
button.appendChild(span);
- var list = elBySel('.buttonList', navigation);
- list.addEventListener(WCF_CLICK_EVENT, function(event) {
- event.stopPropagation();
-
- navigation.classList.remove('open');
- });
-
(function(navigation, button) {
button.addEventListener(WCF_CLICK_EVENT, function(event) {
event.preventDefault();
navigation.classList.toggle('open');
});
+
+ var list = elBySel('.buttonList', navigation);
+ list.addEventListener(WCF_CLICK_EVENT, function(event) {
+ event.stopPropagation();
+
+ navigation.classList.remove('open');
+ });
})(navigation, button);
navigation.insertBefore(button, navigation.firstChild);