inputにjquery-uiを適用しました。
そもそもjQuery-uiはHTMLElementに「適用」するものではないです
javascript
1<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
2<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
3<script>
4$(function(){
5 $('#datepicker').css({width:100,height:50}).animate({width:300,height:150});
6});
7</script>
8<div>
9<label>カレンダー</label>
10<input type="text" id="datepicker" name="tel">
11</div>
追記css適用
テキストボックスにクラスを与えて幅が変更できない・・・的な話ですが
普通に変更されますね。どこがどうなるかさっぱりわかりません。
ブラウザ依存の話かもしれないのでOSやブラウザの種類とバージョンを補足してほしいです。
javascript
1<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css" />
2<style>
3.hoge{width:300px}
4</style>
5<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
6<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
7<script>
8$(function(){
9 $("#datepicker").datepicker();
10 $("#datepicker").datepicker("option", "showOn", 'button');
11 $("#datepicker").datepicker("option", "buttonImageOnly", true);
12 $("#datepicker").datepicker("option", "buttonImage", 'ico_calendar.png');
13});
14</script>
15<div>
16<label>カレンダー</label>
17<input type="text" id="datepicker" name="tel" class="hoge">
18</div>
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2019/07/04 06:19
2019/07/04 06:20
退会済みユーザー
2019/07/04 06:38 編集
2019/07/04 06:42
退会済みユーザー
2019/07/04 06:45
2019/07/04 06:46
退会済みユーザー
2019/07/04 07:13