Add sound to Flash-Like Button with jQuery

I made a flashLike button with jquery through this code:

$(document).ready(function() {
    $('#navigation li a').append('<span class="hover"></span>').each(function () {
        var $span = $('span.hover', this).css('opacity', 0);
        $(this).hover(function () {
            $span.stop().fadeTo(500, 1);  
        }, function () {
    $span.stop().fadeTo(500, 0); 
        });
    });
});

But can we add sound to a hover button like a flash button? thanks in advance

+3
source share
1 answer

Source: https://habr.com/ru/post/1743285/


All Articles