开发者

Jquery fade to making hidden images appear

I am trying to add a fading effect to my page, but once I add this code it makes other images I have set to display:none in css reappear.How can I get this to work on the selected divider only?

<div class="tiles">

"image code here"

 <script>   
            $(document).ready(function(){

    $(".tiles img").fadeTo("slow", 1.0); // This sets the opacity of the thumbs to fade when the page loads
    $(".tiles img").hover(function(){
    $(this).fadeTo("slow", 0.6); // This should set the opacity on hover
     },function(){
    $(this).fadeTo("slow", 1.0); // Thi开发者_JAVA百科s should set the opacity back on mouseout
    });
    });

    </script>


I can't be sure without seeing the rest of your page code, but you might try replacing <div class="tiles"> with <div class="tiles" id="fade_this"> and change $(".tiles img") to $("#fade_this img")

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜