• いつもありがとうございます。

    サイト上で拝見した以下のjQueryコードを設置して、「マウスオンで別の場所の画像が変わる」といった動作を行いましたが、IE7以下のみ動きません。

    <script type=”text/javascript”>
    jQuery (function(){
    jQuery (“.content:not(‘li.hover + .content’)”).hide();
    jQuery (“li”).mouseover(function(){
    jQuery(“li”).removeClass(“hover”);
    jQuery (this).addClass(“hover”);
    jQuery (“.content”).fadeOut();
    jQuery (“li.hover + .content”).fadeIn();
    });
    });
    </script>

    こちら(http://kennyqi.com/archives/221.html)やこちら(http://kachibito.net/web-design/wordpress-with-jquery.html)のサイトを参考に色々と検証してみましたが、だめでした。
    jQueryの知識なく使用しているのですが、IE7以下で動かない理由がお分かりになるかたはいらっしゃいますでしょうか。

3件の返信を表示中 - 1 - 3件目 (全3件中)
  • こちらを参考に

    トピック投稿者 mineminemine

    (@mineminemine)

    ご回答ありがとうございます!

    リンク先のQ&A以下の部分、
    「My site still has many IE7/8 visitors but I want to use jQuery 2.0. Can I do that? If your web site needs oldIE support, and we expect most sites will need it for at least another year or two, you can use IE conditional comments to include version 1.9 only when visitors are using oldIE:

    <!–[if lt IE 9]>
    <script src=”jquery-1.9.0.js”></script>
    <![endif]–>
    <!–[if gte IE 9]><!–>
    <script src=”jquery-2.0.0.js”></script>
    <!–<![endif]–>」
    が当てはまるかと思い、

    <!–[if lt IE 9]>
    <script src=”jquery-1.9.0.js”></script>
    <![endif]–>
    <!–[if gte IE 9]><!–>
    <script src=”jquery-2.0.0.js”></script>
    <!–<![endif]–>

    を<head>の<?php wp_head(); ?>の下に書き込みましたが
    結果は同じでした。
    記載する場所が間違っているのでしょうか?

    トピック投稿者 mineminemine

    (@mineminemine)

    解決しました。
    CSS3を使って実現しているため、IE7以下ではうまく動かないということでした。
    失礼いたしました。

3件の返信を表示中 - 1 - 3件目 (全3件中)
  • トピック「設置したjQueryがIE7以下のみ動きません」には新たに返信することはできません。