0

divの比率を変更するJquery Mobileスライダーの動作中のJSfiddleがあります。

新しいバージョンの Jquery Mobile (1.8.2) で使用したいのですが、うまくいきません。誰でも助けることができますか?

<div data-role="fieldcontain">
<input type="range" name="slider" id="slider" value="60" min="0" max="100" /></div>
<div id="proportion" style="border:1px solid #ccc; width:150px; height:150px;" /></div>​
<script>$("#slider").change(function() { sliderValue = $(this).val(); $("#proportion").width(sliderValue*3); $("#proportion").height(300-sliderValue*3); });​ </script>

http://jsfiddle.net/gsjBC/

4

1 に答える 1

0

使用している jquery モバイル バージョンは古いバージョン (1.0b2) ですが、現在の安定バージョンは 1.2 です。jquery 1.8.2 は jquery mobile 1.0b2 と互換性がない可能性があります。そのため、jquery mobile の最新バージョンにアップグレードする必要がある場合があります。

http://jsfiddle.net/gsjBC/1/

<link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>
于 2012-12-03T05:55:58.990 に答える