<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.7.2-ppt DokuWiki" -->
<?xml-stylesheet href="https://tm.root-n.com/lib/exe/css.php?s=feed" type="text/css"?>
<rss version="2.0">
    <channel>
        <title>Tipsというかメモ programming:javascript:jquery</title>
        <description></description>
        <link>https://tm.root-n.com/</link>
        <lastBuildDate>Tue, 18 Nov 2025 23:12:15 +0900</lastBuildDate>
        <generator>FeedCreator 1.7.2-ppt DokuWiki</generator>
        <image>
            <url>https://tm.root-n.com/lib/images/favicon.ico</url>
            <title>Tipsというかメモ</title>
            <link>https://tm.root-n.com/</link>
        </image>
        <item>
            <title>jQuery :: Ajaxリクエストをブラウザにキャッシュさせない</title>
            <link>https://tm.root-n.com/programming:javascript:jquery:anti_cache</link>
            <description>$.ajaxSetup({ cache: false });


or


$.ajaxSetup({ ifModified: true });</description>
        <category>programming:javascript:jquery</category>
            <pubDate>Thu, 30 Jul 2009 14:41:51 +0900</pubDate>
        </item>
        <item>
            <title>jQuery :: コンフリクト対策</title>
            <link>https://tm.root-n.com/programming:javascript:jquery:anti_conflict</link>
            <description>prototype.js 等のライブラリと併用する時にコンフリクト対策を行う。

	*  「$() 関数」は、jQuery 以外でも多くのライブラリが採用している為、コンフリクトが発生してしまう。





ライブラリのロード順序

	*  例えば、prototype.js と併用する場合「jquery.js」は最後にロードします</description>
        <category>programming:javascript:jquery</category>
            <pubDate>Mon, 15 Feb 2010 13:53:14 +0900</pubDate>
        </item>
        <item>
            <title>jQuery :: チェックボックスをラジオボタンのように振舞わせる</title>
            <link>https://tm.root-n.com/programming:javascript:jquery:checkbox_like_radio</link>
            <description>&lt;script type=&quot;text/javascript&quot; src=&quot;/path/to/jquery.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
    $(function(){
        $(&quot;input[id^='chkbox_']&quot;).click(function(){
            var flag = $(this).prop('checked');
            $(&quot;input[id^='chkbox_']&quot;).prop('checked', false);
            if (flag) $(this).prop('checked', true);
        });
    });
&lt;/script&gt;

&lt;input type=&quot;checkbox&quot; name=&quot;chkbox[]&quot; value=&quot;1&quot; id=&quot;chkbox_1&quot;&gt; 1&lt;br&gt;
&lt;input type=&quot;checkbox&quot; name=&quot;chkbox[]&quot; value=&quot;2&quot; id=&quot;chkbox_2&quot;&gt; 2&lt;br…</description>
        <category>programming:javascript:jquery</category>
            <pubDate>Thu, 20 May 2021 17:07:33 +0900</pubDate>
        </item>
        <item>
            <title>jQuery :: チェックボックス：すべて選択・解除</title>
            <link>https://tm.root-n.com/programming:javascript:jquery:checkbox_toggle</link>
            <description>&lt;script type=&quot;text/javascript&quot; src=&quot;/path/to/jquery.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
    $(function(){
        $(&quot;#toggle&quot;).click(function(){
            $('.chkbox').attr('checked', $(this).attr('checked'));
        });
    });
&lt;/script&gt;

&lt;input type=&quot;checkbox&quot; id=&quot;toggle&quot;&gt; toggle&lt;br&gt;
&lt;br&gt;
&lt;input class=&quot;chkbox&quot; type=&quot;checkbox&quot; name=&quot;ids[]&quot; value=&quot;1&quot;&gt; 1&lt;br&gt;
&lt;input class=&quot;chkbox&quot; type=&quot;checkbox&quot; name=&quot;ids[]&quot; value=&quot;2&quot;&gt; 2&lt;br&gt;
&lt;input class=&quot;chkbox&quot; type=&quot;checkbox&quot; name=&quot;ids[]&quot; value=&quot;3…</description>
        <category>programming:javascript:jquery</category>
            <pubDate>Thu, 30 Jul 2009 14:42:37 +0900</pubDate>
        </item>
        <item>
            <title>jQuery :: ループ内の continue / break</title>
            <link>https://tm.root-n.com/programming:javascript:jquery:continue_break</link>
            <description>jQuery には、ループ内で処理を飛ばしたり、抜けたりする命令である  continue  と  break  が用意されていない。

が、 return 命令  を使うことで同等のことが可能になる。




ｃｏｎｔｉｎｕｅ

ループの先頭に戻る(処理を飛ばす)</description>
        <category>programming:javascript:jquery</category>
            <pubDate>Thu, 13 Nov 2014 16:59:51 +0900</pubDate>
        </item>
        <item>
            <title>jQuery :: フォームの input要素 を整列させる</title>
            <link>https://tm.root-n.com/programming:javascript:jquery:marshal_input_elements</link>
            <description>jqueryで、フォームの input要素 を整列させます。

	*  &lt;table&gt;タグを使わずに、きれいなレイアウトが実現できます。






&lt;script type=&quot;text/javascript&quot; src=&quot;/path/to/jquery.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
    $(function(){
        var max = 0;
        $(&quot;span.label&quot;).each(function(){
            if ($(this).width() &gt; max) max = $(this).width();
        });
        // ラベル左寄せ
        $(&quot;span.label&quot;).width(max).css({&quot;float&quot;:&quot;left&quot;, &quot;clear&quot;:&quot;both&quot;, &quot;padding&quot;:&quot;3px 0px 0px 0px&quot;});

        // ラベル右寄せ
        //$(&quot;span.label&quot;).width(m…</description>
        <category>programming:javascript:jquery</category>
            <pubDate>Fri, 31 Jul 2009 11:17:01 +0900</pubDate>
        </item>
        <item>
            <title>jQuery :: onload と同じタイミングで、処理を実行させる</title>
            <link>https://tm.root-n.com/programming:javascript:jquery:onload</link>
            <description>*  onload のタイミングで実行したい場合は以下のように記述する。
	*  画像等も完全にロード完了していなければならない。


jQuery.event.add(window, &quot;load&quot;, function(){
    // ここに処理内容を記述します。
});</description>
        <category>programming:javascript:jquery</category>
            <pubDate>Thu, 06 Aug 2009 13:26:12 +0900</pubDate>
        </item>
        <item>
            <title>jQuery :: DOM構築後、処理を実行させる</title>
            <link>https://tm.root-n.com/programming:javascript:jquery:ready</link>
            <description>*  DOMのロードが完了して、操作可能になったタイミングで処理を実行します。
	*  画像等が完全にロードされてなくてもOK。


$(document).ready(function(){
    // ここに処理内容を記述します。
});</description>
        <category>programming:javascript:jquery</category>
            <pubDate>Thu, 06 Aug 2009 13:25:48 +0900</pubDate>
        </item>
        <item>
            <title>jQuery :: 画像を指定サイズにリサイズして表示する</title>
            <link>https://tm.root-n.com/programming:javascript:jquery:reseize_image</link>
            <description>jQuery で、画像を指定サイズにリサイズして表示します。

サムネイルの表示に便利です。

	*  ※ 横幅と高さの比率は保ったままリサイズします。






&lt;script type=&quot;text/javascript&quot; src=&quot;/path/to/jquery.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
    jQuery.event.add(window, &quot;load&quot;, function(){
        var fw = 100;        //fixed width
        var fh = 100;        //fixed height
        var sl = 'img.hoge'; //selector
        $(sl).each(function(){
            var w = $(this).width();
            var h = $(this).height();
            if (w &gt;= h) {
           …</description>
        <category>programming:javascript:jquery</category>
            <pubDate>Thu, 30 Jul 2009 14:42:05 +0900</pubDate>
        </item>
        <item>
            <title>jQuery :: 複数の select で selected を連動する</title>
            <link>https://tm.root-n.com/programming:javascript:jquery:synchronized_select</link>
            <description>デモ







デモのソース


&lt;script type=&quot;text/javascript&quot; src=&quot;/path/to/jquery-1.4.2.min.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
$(function(){
    $('.pulldown').change(function(){
        $('.pulldown').val($(this).val());
    });
});
&lt;/script&gt;

&lt;select class=&quot;pulldown&quot;&gt;
&lt;option value=&quot;バナナ&quot;&gt;バナナ&lt;/option&gt;
&lt;option value=&quot;すいか&quot;&gt;すいか&lt;/option&gt;
&lt;option value=&quot;メロン&quot;&gt;メロン&lt;/option&gt;
&lt;/select&gt;
　
&lt;select class=&quot;pulldown&quot;&gt;
&lt;option value=&quot;バナナ&quot;&gt;バナナ&lt;/option&gt;
&lt;option value=&quot;すいか&quot;&gt;すいか&lt;/option&gt;
&lt;option value=&quot;メロン&quot;&gt;メロン&lt;/o…</description>
        <category>programming:javascript:jquery</category>
            <pubDate>Fri, 10 Dec 2010 17:43:36 +0900</pubDate>
        </item>
    </channel>
</rss>
