如何为jquery对话框按钮设置不同的悬停颜色 [英] How to style different hover colors for jquery dialog buttons

查看:111
本文介绍了如何为jquery对话框按钮设置不同的悬停颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不会为我的jquery对话框按钮提供不同的悬停颜色.例如,当用户将鼠标悬停在确定"按钮上时,悬停颜色将为蓝色,而当他将鼠标悬停在取消按钮上时,悬停颜色将为灰色. 谁能告诉我该怎么做?

I won't to give a different hover colors to my jquery dialog buttons. For example when the user will hover over the "Ok" button the hover color will be blue and when he hovers over the cancel button the hover color will be gray. Can anyone tell me how can I do it?

推荐答案

$(document).ready(function() {
    $(":button").hover(function() {
        $(this).css('background', 'url(' / images / buttons / green_26.png ')');
    });
    $(":button").mouseout(function() {
        $(this).css('background', 'url(' / images / buttons / grey_26.png ')');
    });
});

这篇关于如何为jquery对话框按钮设置不同的悬停颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆