Вход Регистрация
Файл: templates/backend/default/assets/plugins/shape-hover/js/hovers.js
Строк: 36
<?php
/**
 * hovers.js v1.0.0
 * http://www.codrops.com
 *
 * Licensed under the MIT license.
 * http://www.opensource.org/licenses/mit-license.php
 * 
 * Copyright 2014, Codrops
 * http://www.codrops.com
 */
(function() {
    
    function 
init() {
        var 
speed 250,
            
easing mina.easeinout;

        [].
slice.call document.querySelectorAll'#grid > a' ) ).forEach( function( el ) {
            var 
Snapel.querySelector'svg' ) ), path s.select'path' ),
                
pathConfig = {
                    
from path.attr'd' ),
                    
to el.getAttribute'data-path-to' )
                };

            
el.addEventListener'mouseenter', function() {
                
path.animate( { 'path' pathConfig.to }, speedeasing );
            } );

            
el.addEventListener'mouseleave', function() {
                
path.animate( { 'path' pathConfig.from }, speedeasing );
            } );
        } );
    }

    
init();

})();
?>
Онлайн: 1
Реклама