【发布时间】:2011-09-30 23:53:05
【问题描述】:
我有下面的 jquery 代码,它将按钮中的文本更改为显示/隐藏,但我还想在鼠标悬停在按钮上时更改工具提示/标题以显示/隐藏
$('#HideShow').click(function()
{
if ($(this).text() == "Show")
{
$(this).text("Hide");
}
else
{
$(this).text("Show");
};
});
如何使用 jquery 来更改工具提示/标题以在按钮更改时显示/隐藏?
【问题讨论】:
标签: javascript jquery button toggle