www.webdeveloper.com
Results 1 to 2 of 2

Thread: Need to make transition fade in/fade out

  1. #1
    Join Date
    Jun 2012
    Posts
    1

    Need to make transition fade in/fade out

    I am trying to make the div fade in when hovered, and fade out when mouseout. The issue I am having is that it flickers when I hover in the div - Is there any possible way to fix this? Thanks in advance!

    JQuery:
    Code:
    $(".original").mouseover(function() {
    		$(this).fadeOut(300, function() {
    			$(this).css("display", "none");
    		});
        });
    $(".checked").mouseout(function() {
    		$(this).fadeIn(function() {
    			$(this).children().fadeIn(600);
        });    
    });
    HTML Code:
    <div class="checked"><div class="yo">eeee <img src="http://a.fsdn.com/con/icons/im/image-tagger@sf.net/image-tagger_default.png" alt="Smiley face" height="42" width="42" /></div>
            <div class="original">swerWWWs<img src="http://a.fsdn.com/con/icons/kx/kx-image@sf.net/kx-image_default.png" alt="Smiley face" height="42" width="42" /></div>
    </div>
    CSS:
    Code:
    .checked {
        position: relative;
        background-color: #FF0000;
        height: 100px;
        width: 100px;
        z-index: 0;
    }
    .original {
        position: fixed;
        background-color: #0000FF;
        height: 100px;
        width: 100px;
        z-index: 5;
        opacity:0.5;
    }
    
    .yo{
        position: fixed;
        background-color: #FFBB40;
        height: 100px;
        width: 100px;
        z-index: 5;
    }

  2. #2
    Join Date
    Aug 2011
    Posts
    7
    Which Version of JQuery are you using?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles