function _setLabel($btn, text, style, tooltip) {
        // Clear text/styles from previous status
        $("span", $btn).remove();
        $btn.removeClass(_allStatusStyles);

        // Set text/styles for new status
        if (text && text.length > 0) {
            $("<span class=\"label\">")
                .addClass(style)
                .text(text)
                .appendTo($btn);
        } else {
            $btn.addClass(style);
        }

        if (tooltip) {
            $btn.attr("title", tooltip);
        }
    }
function _setLabel($btn, text, style, tooltip) {
        // Clear text/styles from previous status
        $("span", $btn).remove();
        $btn.removeClass(_allStatusStyles);

        // Set text/styles for new status
        if (text && text.length > 0) {
            $("<span class=\"label\">")
                .addClass(style)
                .text(text)
                .appendTo($btn);
        } else {
            $btn.addClass(style);
        }

        if (tooltip) {
            $btn.attr("title", tooltip);
        }
    }
function _setLabel ( $btn , text , style , tooltip ) { // Clear text/styles from previous status $ ( "span" , $btn ) . remove ( ) ; $btn . removeClass ( _allStatusStyles ) ; // Set text/styles for new status if ( text && text . length > 0 ) { $ ( "<span class=\"label\">" ) . addClass ( style ) . text ( text ) . appendTo ( $btn ) ; } else { $btn . addClass ( style ) ; } if ( tooltip ) { $btn . attr ( "title" , tooltip ) ; } }
Change the appearance of a button. Omit text to remove any extra text; omit style to return to default styling;
omit tooltip to leave tooltip unchanged.
Change the appearance of a button . Omit text to remove any extra text ; omit style to return to default styling ; omit tooltip to leave tooltip unchanged .
Set label for status