2014-02-18 35 views
0

我有一個web網格,我需要在網格中製作一個數字向上的列。爲此,我使用jQuery UI微調控件。錯誤:對象[對象對象]在MVC webgrid中沒有方法'微調'

只是一個眼神:

grid1.Column("Salary",format: (item) => Html.TextBox("Salary", (int)item.Salary, new { @class = "spinnertxt",@id="txt" + item.EmployeeId }), header: "Salary"))) 

和創建微調:

<script> 
    jQuery(document).ready(function() { 
     jQuery('.spinnertxt').spinner({ min: -100 }); 
     jQuery('.spinnertxt').spinner('option', 'max', 100); 

    }); 
</script> 

,但結果沒有預期。該瀏覽器提供了一個腳本錯誤:

錯誤:對象的翻譯:有沒有方法「微調」

我使用下面的jQuery refernces:

<script src="/Scripts/jquery-1.7.1.js"></script> 
<script src="/Scripts/jquery-ui-1.8.20.js"></script> 
<link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css"> 

我沒有重複的引用jQuery庫..

請任何人建議。

+0

你使用jquery-ui的自定義構建版本還是完整版本?可疑的微調插件不包括在內 –

+0

實際上微調控件在版本1.9中添加.... –

回答

0

jquery UI 1.8.20不包含微調,請嘗試切換到最新版本。

+0

謝謝你的問題已經解決.. –

相關問題