How to add ToolTip using Javascript

2 posts, 1 answers
  1. Richard M
    Richard M avatar
    76 posts
    Member since:
    Mar 2010

    Posted 10 Nov 2010 Link to this post

    I would like to use one ToolTip for multiple buttons.  The ToolTip has custom content which includes text, buttons, checkboxes.  My plan is to create a Javascript function to bring up the ToolTip when the button is clicked on. 

    First, I would add the Javascript function to the client click event of my buttons:

    Then I need to create a Javascript function (called myFunction) to bring up the tooltip:
    function myFunction()
         // code goes here

    How do I attach and bring up a ToolTip in Javascript?
  2. Answer
    Svetlina Anati
    Svetlina Anati avatar
    2795 posts

    Posted 11 Nov 2010 Link to this post

    Hello Richard M,

     Straight to your questions:

    1) To programmatically show a tooltip you should set ShowEvent="FromCode", reference the tooltip and call its method show()

    2) If you want not only to programmatically show but also to create dynamically a tooltip on the client you should use the RadToolTipManager's createToolTip method as shown in the demo below:

    I hope that my reply is detailed enough and helpful, let me know how it goes.

    Best wishes,
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top