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. Image for the cookie policy date

How do I get the slider tooltip to appear when the slider is first loaded?

Hi,


I’m using Syncfusion.EJ2.AspNet.Core, version 16.4.0.46.


I’ve created a range slider which works as I need it to except for one aspect. When the page loads and the slider is first loaded, I want the slider tooltip to appear and display the initial value of the slider, just as it does when the slider handle is clicked.


I’ve tried this in $(document).ready(function () , which does not work:

sliderHandle = document.getElementById('myslider).querySelector('.e-handle');

sliderHandle.click();


I’ve attached two screenshots to illustrate.


Can anyone please tell me how to achieve what I need?


Mike

 


Attachment: SliderScreenshots_468484d0.zip

1 Reply

MI Mike September 13, 2019 01:24 PM UTC

If it helps anyone else, I just received a working solution from a Syncfusion ticket I opened. The key is this to use  this:

sliderObj = document.getElementById("slider").ej2_instances[0]; 
sliderObj.tooltipToggle(sliderObj.firstHandle); // pass slider Handle element as an argument.

Loader.
Up arrow icon