开发者

Add Sound to Flash-Like Button With jQuery

开发者 https://www.devze.com 2022-12-29 02:07 出处:网络
I have made a flashLike button w开发者_如何转开发ith jquery via this code: $(document).ready(function() {

I have made a flashLike button w开发者_如何转开发ith jquery via 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 button in hover like flash buttons? Thanks in advance


Have a look at the jQuery Sound Plugin here: http://dev.jquery.com/browser/trunk/plugins/sound/jquery.sound.js?rev=5750

0

精彩评论

暂无评论...
验证码 换一张
取 消