I have a custom button added to SharePoint Ribbon. And there is EnabledScript attribute of the CommandUIHandler for the button. This attribute contains a javascript code to conditionally disable/enable the button. Can I set a tooltip message that show up when user moves the mouse over a button when it is disabled?
1 Answer
You can use the HTML title
attribute of your custom button
. Set it dynamically on basis of whether it is enabled or disabled. You can bind onmouseover
event to the button, where you will be resetting the title
attribute dynamically.
-
1Hm, I am not sure how I can specify any HTML attributes of the ribbon button. Do you have any example?– SerhiyCommented Dec 10, 2014 at 7:11
ToolTipTitle
andToolTipDescription
of the<Button>
element to show tooltip on your custom button and they show even when the button is disabled. Or do you want the tooltip to be shown only if button is disabled.