Title: Numberspinner set min / max after page has loaded [Solved] Post by: devnull on August 08, 2015, 01:17:54 AM How do I set the min/max values programatically and override the defaults set in the initial html code, this does not appear to work:
Code: $('input#QTY').numberspinner('options').max = 100; Title: Re: Numberbox set min / max after page has loaded Post by: stworthy on August 08, 2015, 01:43:41 AM Please try the code below instead.
Code: $('input#QTY').numberbox('options').max = 100; Title: Re: Numberbox set min / max after page has loaded Post by: devnull on August 08, 2015, 01:51:58 AM Thanks, I already tried that and that does not appear to work either ?
Title: Re: Numberspinner set min / max after page has loaded Post by: stworthy on August 08, 2015, 05:29:39 AM After modifying the 'max' option, you have to call 'setValue' method again to reset its value.
Code: var n = $('#nn'); Title: Re: Numberspinner set min / max after page has loaded Post by: devnull on August 08, 2015, 03:16:27 PM Thanks, yes that is what I was doing, here's a bit of the actual code snippet:
Code: onSelect: function(data){ After the code executes, I can still increment the numberspinner beyond it's max value. Title: Re: Numberspinner set min / max after page has loaded Post by: stworthy on August 09, 2015, 05:15:50 AM Please refer to http://jsfiddle.net/54v8nacp/
Title: Re: Numberspinner set min / max after page has loaded [Solved] Post by: devnull on August 27, 2015, 06:40:08 PM Thanks, it's working, not sure why it wasn't before.
|