{
                while ((element = element.parentElement) && !element.classList.contains(name)) ;
                return element;
            }

            function bindOnQuery(query, callback, action = 'click') {
                var elements = document.querySelectorAll(query);
                for (var i = 0; i < elements.length; i++) {
                    elements[i].addEventListener(action, callback, false);
                }
            }

            function bindOnId(name, callback, action = 'click')