jQuery UI Widgets › Forums › Editors › ScrollBar, Slider, BulletChart, RangeSelector › Problem to set the minimum value after slider widget is initialized
Tagged: Angular 2 slider, Angular slider, angularjs, aria, aria-disabled, controller, initialize, jqxslider, not reloading, reload, slider
This topic contains 6 replies, has 3 voices, and was last updated by Dimitar 8 years ago.
-
Author
-
August 6, 2012 at 11:55 am Problem to set the minimum value after slider widget is initialized #6614
Hi,
I have a problem to set the minimum value for a slider after it is initialized. I can set the min-value, but the method ‘setValue’ is ignored. To set the maximum value works fine.
e.g
$(“#slider”).jqxSlider(
{theme: theme
, width: 370
, value: 2
, max: 35
, min: 10
, mode: ‘fixed’
, step: 0.01
, tooltip: false});
$(“#slider”).jqxSlider({min: 10, max: 20});
$(“#slider”).jqxSlider(‘setValue’, 15);
The slider will show the value 10 and not 15.
Is this a little bug or am I barking up the wrong tree.
Thanks for your help!
Best regards,
Mark
Hi Mark,
Here is an example based on yours. A button changes the min and max and also sets the value. We have not encountered any issues in it. It works without the button, too.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>jQuery Slider Sample</title><link rel="stylesheet" href="jqwidgets/styles/jqx.base.css" type="text/css"/><link rel="stylesheet" href="jqwidgets/styles/jqx.summer.css" type="text/css"/><script type="text/javascript" src="jquery-1.7.2.min.js"></script><script type="text/javascript" src="jqwidgets/jqxcore.js"></script><script type="text/javascript" src="jqwidgets/jqxbuttons.js"></script><script type="text/javascript" src="jqwidgets/jqxslider.js"></script></head><body><div id='content'> <script type="text/javascript"> $(document).ready(function () { $("#jqxslider").jqxSlider({ theme: 'summer', width: 370, value: 2, max: 35, min: 10, mode: 'fixed', step: 0.01, tooltip: false}); $('#jqxslider').bind('change', function (event) { $('#jqxsliderValue').html('Value: ' + event.args.value); }); $("#btn").click(function(){ $("#jqxslider").jqxSlider({min: 10, max: 20}); $("#jqxslider").jqxSlider('setValue', 15); }); }); </script> <div id="jqxsliderValue">Value:</div> <div id='jqxslider'></div> <button id="btn">Set min, max and value</button></div></body></html>
Best Regards,
Dimitar,jQWidgets team,
http://www.jqwidgets.com/Ups, found my mistake. Sorry…
November 29, 2016 at 5:49 am Problem to set the minimum value after slider widget is initialized #89381Hi
I am using jqxslider.
$(‘#jqxSlider’).jqxSlider({
theme: ‘success’,
width: 220,
height: 60,
value: 30,
max: 100,
min: 0,
mode: ‘fixed’,
step: 1,
showTickLabels: true,
ticksFrequency: 40,
tooltip: true,
tickSize: 5,
tooltipPosition: “far”,
});with angularjs .
In my scenario there are 3 html pages and 2 controllers , On fisrt page slider is defined.
When user is moving from first page to second and then to third everything is fine ,
when user again moves back to first page it gets disappeared.
When I checked in through inspection , found that its aria-disabled property is setting to false.
I tried to set its css through script but got failed.November 29, 2016 at 6:23 am Problem to set the minimum value after slider widget is initialized #89385Hi gaurav30hkr,
Is there any other JavaScript code that manipulates this slider? If so, could you, please, share it, too? Please also refer to our AngularJS jqxSlider example: http://www.jqwidgets.com/jquery-widgets-demo/demos/angularjs-demos/slider.htm?light.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/November 29, 2016 at 8:30 am Problem to set the minimum value after slider widget is initialized #89394Thanks for quick reply. 🙂
only this for setting value
$(‘#jqxSlider’).on(‘change’, function (event) {
$rootScope.ConfidenceThreshold = new Number(event.args.value);
});no such manipulation on the slider is being performed.
Let me check with AngularJS jqxSlider.November 30, 2016 at 6:40 am Problem to set the minimum value after slider widget is initialized #89433Hi gaurav30hkr,
We are looking forward to your feedback. Please also share if there are any errors thrown in your browser’s console when the slider disappears.
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.