Fade effect from left to right in the image.

I have a fade effect structure. With the following:

  <img src='firstStar.jpg' alt='star image' id='firstStar' />

    var loopImages = function(){

         $('#firstStar').fadeIn(1500, function(){

                   $('#firstStar').fadeOut(1500, loopImages);           
         });
    }
    loopImages();

He works. But I want this effect to be left to the right. Is it possible?

+2
source share
3 answers

You can try something like this with animate

$(document).ready(function(){
    $("#firstStar").animate({left:200, opacity:"show"}, 1500);
});

Make sure the div is initially hidden (style = "display: none;").

+3
source

You can try with this, I worked with him in my previous project.

http://jonobr1.github.com/diagonalFade/

Hope this fits your needs.

Sincerely.

+4
source

All Articles