Error: it is impossible to call methods on the counter before initialization; tried to call method "disableWithoutRemovingValue"

I tried using the ui.spinner.js plugin and in the finished document I initialize some textbox as a disabled counter like:

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

      

In this case, this error: Error: unable to call methods on the counter before initialization; tried to call the "disableWithoutRemovingValue" method. Also, I tried to change disableWithoutRemovingValue using a parameter, but still I got the same error. So, is there anyone who can help me fix this error?

+4


source to share


1 answer


I got stuck with the same problem and I found a solution that solves that:



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


      

0


source







All Articles