Új hozzászólás Aktív témák

  • TOTAL LOKI

    tag

    válasz Sk8erPeter #987 üzenetére

    Na kipróbáltam.

    Íme a kód:

    $(document).ready(function(){
    // $(".magicbox").children(":nth-child(2)").hide();
    $(".magicbox").hover(function() {
    $(this).children(":eq(1)").stop().fadeTo("slow", 1.0);
    }, function() {
    $(this).children(":eq(1)").stop().fadeTo("slow", 0.0);
    });
    });

    A dolog azért érdekes, mert végülis csinálja amit kérek, csak a színes kép nem a fekete-fehér helyett jön be, hanem a fekete-fehér mellé.

    Íme a html kód:

    <div class="magicbox">
    <img src="http://www.gimp.org/tutorials/Color2BW/after-384x288.jpg" width="384" height="288" />
    <img src="http://www.gimp.org/tutorials/Color2BW/before-384x288.jpg" width="384" height="288" />
    </div><div class="magicbox">
    <img src="http://www.gimp.org/tutorials/Color2BW/after-384x288.jpg" width="384" height="288" />
    <img src="http://www.gimp.org/tutorials/Color2BW/before-384x288.jpg" width="384" height="288" />
    </div>
    <div class="magicbox">
    <img src="http://www.gimp.org/tutorials/Color2BW/after-384x288.jpg" width="384" height="288" />
    <img src="http://www.gimp.org/tutorials/Color2BW/before-384x288.jpg" width="384" height="288" />
    </div>
    <div class="magicbox">
    <img src="http://www.gimp.org/tutorials/Color2BW/after-384x288.jpg" width="384" height="288" />
    <img src="http://www.gimp.org/tutorials/Color2BW/before-384x288.jpg" width="384" height="288" />
    </div>

    Pontosan úgy csináltam, ahogy a pl. le van írva.

    TL

Új hozzászólás Aktív témák