dist/waves.js
function removeRipple(e, el, ripple) {

        // Check if the ripple still exist
        if (!ripple) {
            return;
        }

        ripple.classList.remove('waves-rippling');

        var relativeX = ripple.getAttribute('data-x');
        var relativeY = ripple.getAttribute('data-y');
        var scale     = ripple.getAttribute('data-scale');
        var translate = ripple.getAttribute('data-translate');

        // Get delay beetween mousedown and mouse leave
        var diff = Date.now() - Number(ripple.getAttribute('data-hold'));
        var delay = 350 - diff;

        if (delay < 0) {
            delay = 0;
        }

        if (e.type === 'mousemove') {
            delay = 150;
        }

        // Fade out ripple after delay
        var duration = e.type === 'mousemove' ? 2500 : Effect.duration;

        setTimeout(function() {

            var style = {
                top: relativeY + 'px',
                left: relativeX + 'px',
                opacity: '0',

                // Duration
                '-webkit-transition-duration': duration + 'ms',
                '-moz-transition-duration': duration + 'ms',
                '-o-transition-duration': duration + 'ms',
                'transition-duration': duration + 'ms',
                '-webkit-transform': scale + ' ' + translate,
                '-moz-transform': scale + ' ' + translate,
                '-ms-transform': scale + ' ' + translate,
                '-o-transform': scale + ' ' + translate,
                'transform': scale + ' ' + translate
            };

            ripple.setAttribute('style', convertStyle(style));

            setTimeout(function() {
                try {
                    el.removeChild(ripple);
                } catch (e) {
                    return false;
                }
            }, duration);

        }, delay);
    }
function removeRipple(e, el, ripple) {

        // Check if the ripple still exist
        if (!ripple) {
            return;
        }

        ripple.classList.remove('waves-rippling');

        var relativeX = ripple.getAttribute('data-x');
        var relativeY = ripple.getAttribute('data-y');
        var scale     = ripple.getAttribute('data-scale');
        var translate = ripple.getAttribute('data-translate');

        // Get delay beetween mousedown and mouse leave
        var diff = Date.now() - Number(ripple.getAttribute('data-hold'));
        var delay = 350 - diff;

        if (delay < 0) {
            delay = 0;
        }

        if (e.type === 'mousemove') {
            delay = 150;
        }

        // Fade out ripple after delay
        var duration = e.type === 'mousemove' ? 2500 : Effect.duration;

        setTimeout(function() {

            var style = {
                top: relativeY + 'px',
                left: relativeX + 'px',
                opacity: '0',

                // Duration
                '-webkit-transition-duration': duration + 'ms',
                '-moz-transition-duration': duration + 'ms',
                '-o-transition-duration': duration + 'ms',
                'transition-duration': duration + 'ms',
                '-webkit-transform': scale + ' ' + translate,
                '-moz-transform': scale + ' ' + translate,
                '-ms-transform': scale + ' ' + translate,
                '-o-transform': scale + ' ' + translate,
                'transform': scale + ' ' + translate
            };

            ripple.setAttribute('style', convertStyle(style));

            setTimeout(function() {
                try {
                    el.removeChild(ripple);
                } catch (e) {
                    return false;
                }
            }, duration);

        }, delay);
    }
function removeRipple ( e , el , ripple ) { // Check if the ripple still exist if ( ! ripple ) { return ; } ripple . classList . remove ( 'waves-rippling' ) ; var relativeX = ripple . getAttribute ( 'data-x' ) ; var relativeY = ripple . getAttribute ( 'data-y' ) ; var scale = ripple . getAttribute ( 'data-scale' ) ; var translate = ripple . getAttribute ( 'data-translate' ) ; // Get delay beetween mousedown and mouse leave var diff = Date . now ( ) - Number ( ripple . getAttribute ( 'data-hold' ) ) ; var delay = 350 - diff ; if ( delay < 0 ) { delay = 0 ; } if ( e . type === 'mousemove' ) { delay = 150 ; } // Fade out ripple after delay var duration = e . type === 'mousemove' ? 2500 : Effect . duration ; setTimeout ( function ( ) { var style = { top : relativeY + 'px' , left : relativeX + 'px' , opacity : '0' , // Duration '-webkit-transition-duration' : duration + 'ms' , '-moz-transition-duration' : duration + 'ms' , '-o-transition-duration' : duration + 'ms' , 'transition-duration' : duration + 'ms' , '-webkit-transform' : scale + ' ' + translate , '-moz-transform' : scale + ' ' + translate , '-ms-transform' : scale + ' ' + translate , '-o-transform' : scale + ' ' + translate , 'transform' : scale + ' ' + translate } ; ripple . setAttribute ( 'style' , convertStyle ( style ) ) ; setTimeout ( function ( ) { try { el . removeChild ( ripple ) ; } catch ( e ) { return false ; } } , duration ) ; } , delay ) ; }
Hide the effect and remove the ripple. Must be
a separate function to pass the JSLint...
Hide the effect and remove the ripple . Must be a separate function to pass the JSLint ...