build/demo.js
function msgBox(messageHTML) {
        var msgEl = document.querySelector('.msg-box'),
            rect = this.getBoundingClientRect();

        msgEl.style.top = window.scrollY + rect.bottom + 8 + 'px';
        msgEl.style.left = window.scrollX + rect.left + 8 + 'px';

        msgEl.style.display = 'block';

        msgEl.querySelector('.msg-box-close').addEventListener('click', closeMsgBox);
        msgEl.querySelector('.msg-box-content').innerHTML = messageHTML;

        this.classList.add('filter-box-warn');
    }
function msgBox(messageHTML) {
        var msgEl = document.querySelector('.msg-box'),
            rect = this.getBoundingClientRect();

        msgEl.style.top = window.scrollY + rect.bottom + 8 + 'px';
        msgEl.style.left = window.scrollX + rect.left + 8 + 'px';

        msgEl.style.display = 'block';

        msgEl.querySelector('.msg-box-close').addEventListener('click', closeMsgBox);
        msgEl.querySelector('.msg-box-content').innerHTML = messageHTML;

        this.classList.add('filter-box-warn');
    }
function msgBox ( messageHTML ) { var msgEl = document . querySelector ( '.msg-box' ) , rect = this . getBoundingClientRect ( ) ; msgEl . style . top = window . scrollY + rect . bottom + 8 + 'px' ; msgEl . style . left = window . scrollX + rect . left + 8 + 'px' ; msgEl . style . display = 'block' ; msgEl . querySelector ( '.msg-box-close' ) . addEventListener ( 'click' , closeMsgBox ) ; msgEl . querySelector ( '.msg-box-content' ) . innerHTML = messageHTML ; this . classList . add ( 'filter-box-warn' ) ; }
Display an error message box.
@this {Element} The offending input field.
@param {string} messageHTML
Display an error message box .