jQuery UI Widgets Forums Dialogs and Notifications Tooltip, Notification, Popover Setting Tooltip on jqxSlider Causes .val() to be empty.

This topic contains 3 replies, has 2 voices, and was last updated by  Dimitar 8 years, 8 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author

  • roblajolla
    Participant

    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());
    });


    Dimitar
    Participant

    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,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/


    roblajolla
    Participant

    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


    Dimitar
    Participant

    Hi Rob,

    You can try the following alternative to $('#jqxSlider').val():

    $('#jqxSlider').jqxSlider('val')

    and your code should work as expected.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.