2016-07-01 28 views
0

jQuery UI SelectMenuを実装しようとしていますが、ブラウザのコンソールで何度も同じエラーが発生します。ここでjQuery UI SelectMenuエラー

は、HTMLコード

<select name="files" id="files"> 
    <optgroup label="Scripts"> 
    <option value="jquery">jQuery.js</option> 
    <option value="jqueryui">ui.jQuery.js</option> 
    </optgroup> 
    <optgroup label="Other files"> 
    <option value="somefile">Some unknown file</option> 
    <option value="someotherfile">Some other file with a very long option text</option> 
    </optgroup> 
</select> 

とJavaScript/jQueryのコード

$(function() { 

$("#files").selectmenu(); 

}); 

ITSはjQueryのUIのWebサイトから同じですが、私が動作しませんです。

これはエラーです:

jquery-3.0.0.js:9779 Uncaught TypeError: elem.getClientRects is not a function

私は誰もがアイデアを持っている願っています。

jquery-ui古いまたは最新のものであるかもしれないとjqueryバージョン>= 3.0との互換性の問題があります。あなたに

+0

? –

+0

最新の1.11.4 – wiifree

+0

jquery(2.4)のバージョンをチェックしてもうまくいきますが、誰かが私が3.0でエラーになる方法を見つけることを願っています。私は3.0を使用したい – wiifree

答えて

1

ありがとうございます。 jquery-migrate-3.0.jsを含めて、これがうまくいくかどうかを確認することをお勧めします。 release docあたりとして

使用しているjQueryUIバージョン

To assist with upgrading, we have a brand new 3.0 Upgrade Guide. And the jQuery Migrate 3.0 plugin will help you to identify compatibility issues in your code. Your feedback on the changes will help us greatly, so please try it out on your existing code and plugins.

In addition, we’ve got the release for jQuery Migrate 3.0. We highly recommend using this to address any issues with breaking changes in jQuery 3.0. You can get those files here:

jquery-migrate-3.0.js

jquery-migrate-3.0.min.js

Fiddle DEMO with jquery migrate 3.0 included

+0

助けてくれてありがとう – wiifree

+0

いつでも..ハッピーコーディング.. :) –

関連する問題