简体   繁体   中英

how to disable tooltip when button is disabled on click

I've a button like this

<asp:Button class="ico-back" title="Back" ID="btnAttritionBack" runat="server" disabled="disabled"></asp:Button>

when focus is on button it shows tooltip, otherwise doesn't show. But here on click event of this button in javascript i'm disabling it. Even after losing focus it doesn't hide tooltip.

$("input[id$='btnAttritionBack']").on("click", function (e) {
    LoadHRData("ALL");
    //$("#" + btnAttritionBack).removeAttr("title");
    $("#" + btnAttritionBack).prop("disabled", true);
    e.preventDefault();
});

I've tried disabling it but it doesn't work.

You probably need to set ClientIDMode to Static in the aspx markup. By default, the ID rendered to the browser gets stuff put before it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM