最近の更新

2013年4月16日火曜日

Buttonアイコンボタン

【目的】
jQuery Mobile1.3.1でアイコンボタンを指定します。



【準備】
1.「jQuery Mobile1.3.1の使用方法(画像が必要な場合)」の手順の通り、jQuery Mobileに必要なファイルを配置しておきます。



【手順1】
1.HTMLファイル「index.html」(任意)を作成。
2.「index.html」を以下の様に入力。
<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="jquery.mobile-1.3.1.min.css" />
</head>
<body>
    <a href="#" data-role="button" data-icon="arrow-l" data-iconpos="left" data-inline="true">左にアイコン</a>
    <a href="#" data-role="button" data-icon="arrow-r" data-iconpos="right" data-inline="true">右にアイコン</a>
    <a href="#" data-role="button" data-icon="arrow-u" data-iconpos="top" data-inline="true">上にアイコン</a>
    <a href="#" data-role="button" data-icon="arrow-d" data-iconpos="bottom" data-inline="true">下にアイコン</a>

    <script src="jquery-1.9.1.min.js"></script>
    <script src="jquery.mobile-1.3.1.min.js"></script>
</body>
</html>



【手順2】
1.ブラウザで「index.html」を開き、以下の様に表示されれば成功です。













































以上です。

0 件のコメント:

コメントを投稿

注: コメントを投稿できるのは、このブログのメンバーだけです。

関連記事