jQuery UI Widgets › Forums › General Discussions › Dialogs and Notifications › Tooltip, Notification, Popover › Setting Tooltip on jqxSlider Causes .val() to be empty.
Tagged: Angular slider, jquery slider, jqxslider, jqxTooltip, slider, Tooltip, val
This topic contains 3 replies, has 2 voices, and was last updated by Dimitar 10 years ago.
-
Author
-
Hi,
When I set a tooltip on the jqxSlider it causes the val to be empty. If I comment out the tooltip, the val returns correctly. What am I doing wrong?
I copied a sample from one of your jsfiddle examples below and modified it to illustrate the issue.
Thank you!
Rob
<div id=”jqxSlider”></div>
<div id=”log”></div>$(‘#jqxSlider’).jqxSlider({
theme: ‘energyblue’,
mode: ‘fixed’
});$(‘#jqxSlider’).jqxSlider(‘val’, 5);
$(‘#jqxSlider’).jqxTooltip({content: ‘test’});
$(‘#jqxSlider’).on(‘change’, function (event) {
var value = new Number(event.args.value).toFixed(2);
$(“#log”).html(“The new event.value is ” + value + ‘, val ‘ + $(‘#jqxSlider’).val());
});Hi roblajolla,
Please note that jqxSlider has a built-in tooltip, which can be enabled by setting tooltip to true. Here is an example on the matter: http://jsfiddle.net/jqwidgets/fbPsv/.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/Dimitar,
Thank you for the quick response. However, the internal tooltip for the slider is intended to be a slider value display not a traditional tooltip on a control that provides popup help information for the user. It seems that the internal code for the slider uses the same internal attributes for the value tooltip, which is what may be causing the odd interaction behavior I am seeing.
I have modified my design to not use the tooltip on the slider for help text purposes.
Thank you,
Rob
Hi Rob,
You can try the following alternative to
$('#jqxSlider').val():$('#jqxSlider').jqxSlider('val')and your code should work as expected.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.