JQueryの使い方

JQueryの使い方などについてまとめました。

959 views

ダイアログに表示する内容をhtmlに書く。

<div id="category-dialog" title="カテゴリの追加" style="display:none;">

        <p>
            カテゴリー名を入力してください
        </p>
        <p><input id="category_text" type="text"></p>

        <p class="text-right">
            <button id="category_button" type="submit" class="btn btn-secondary">保存する</button>
        </p>
</div>

jQueryのサンプル。jQueryのui関連のライブラリを取り込む必要がある。

        <script type="text/javascript" src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
        <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css">
        $("#open-category-dialog").on("click", function() {
            $("#category-dialog").dialog({
            });
        });

Page 6 of 8.

前のページ 次のページ



[添付ファイル]


お問い合わせ

プロフィール

すぺぺぺ

自己紹介

本サイトの作成者。
プログラムは趣味と勉強を兼ねて、のんびり本サイトを作っています。
フレームワークはdjango。
ChatGPTで自動プログラム作成に取り組み中。

サイト/ブログ

https://www.osumoi-stdio.com/novel/

ツイッター

@darkimpact0626