How to change jQuery UI Button Tooltip

jQuery UI Button shows the text of the button as tooltip. That is default behavior of jQuery UI Button. Sometimes you need to override this default behavior and you want to set the tooltip to some different text. Well, that's possible.

jQuery UI Button has option called "label". When this is not specified then it uses button's text, otherwise value of this attribute.
$(function() {
    $("#btnClose").button({
        icons: {
            primary: "ui-icon-closethick"
        },
        text: false,
        label: 'Close Wizard'
    });
});​
See result below.

Feel free to contact me for any help related to jQuery, I will gladly help you.
SHARE

Nothing shocks me, I'm a Software Engineer. And I am not young enough to know everything. I live in World Wide Web and from there take care of this website. This website communicates about my work, learning and experience. I believe life is short, and it is for loving, sharing, learning and connecting. So lets connect..