)
We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Essential JS2

Syncfusion jQuery based widgets are no longer in active development. Switch to our pure JavaScript based next generation Essential JS 2 library.

Syncfusion Feedback

Does ejTooltip supports HTML content from the title attribute of the target element?

Platform: jQuery |
Control: ejTooltip |
Published Date: June 7, 2016 |
Last Revised Date: May 10, 2019
Tags: javascript

Yes, ejTooltip supports the HTML content from the title attribute of the given target element.

The default browser tooltip does not support the html element in the title attribute to display the tooltip.

ejTooltip will fetch the text or any html elements from the title attribute of the target element if the content property is not specified in the tooltip properties list and rendered to the tooltip wrapper.

Please refer the following sample.

Step 1: In title attribute, we have given the value as 'ECMAScript (or ES) is a trademarked scripting-language specification standardized by Ecma International in ECMA-262 and <a href="http://www.ecmascript.org/"> more</a>.' We have used ‘<a>’ element in the title attribute.

Javascript

<div class="frame">

        <div class="control">

            JavaScript is a high-level, dynamic, untyped, and interpreted programming language. It has been standardized in the <a id="link1" title='ECMAScript (or ES) is a trademarked scripting-language specification standardized by Ecma International in ECMA-262 and <a href="http://www.ecmascript.org/"> more</a>.'><u> ECMAScript </u> </a>language specification.

        </div>

    </div>

 

 

Step 2: Define the tooltip as follows. In declaration we did not specify the content for the Tooltip. Because the content will be fetched from the title attribute.

Javascript

<script type="text/javascript">

        $(function () {

            $("#link1").ejTooltip(

             {

                 width: "10%"

             });

        });

    </script>

 

 

Tooltip

ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon