4

I tried to use the ui.spinner.js plugin, and in document ready i initialize some textbox to be a disabled spinner like this:

$('#id').spinner("disableWithoutRemovingValue");

In this case is have this error : Error: cannot call methods on spinner prior to initialization; attempted to call method 'disableWithoutRemovingValue'. Also, i tried to change disableWithoutRemovingValue by using option but still i have the same error. So, is there any one help me to fix this error?

user3706803
  • 155
  • 1
  • 2
  • 12

1 Answers1

0

I've been stuck with same trouble and I've found the workaround is resolving that:

$(document).on('pagebeforeshow', function () {
    $('#id').spinner("disableWithoutRemovingValue");
});

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Jigius
  • 325
  • 4
  • 10