错误:初始化前无法在Spinner上调用方法;尝试调用方法"disableWithoutRemovingValue" [英] Error: cannot call methods on spinner prior to initialization; attempted to call method 'disableWithoutRemovingValue'

查看:100
本文介绍了错误:初始化前无法在Spinner上调用方法;尝试调用方法"disableWithoutRemovingValue"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用ui.spinner.js插件,在准备好文档时,我将一些文本框初始化为禁用的微调器,如下所示:

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");

在这种情况下有此错误: 错误:初始化前无法在Spinner上调用方法;尝试调用方法"disableWithoutRemovingValue".此外,我试图通过使用选项更改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?

推荐答案

我也遇到了同样的麻烦,并且发现解决方法正在解决该问题:

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

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

这篇关于错误:初始化前无法在Spinner上调用方法;尝试调用方法"disableWithoutRemovingValue"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆