Temporary animation with jQuery

http://i28.tinypic.com/2j0zbxi.gif http://i28.tinypic.com/2j0zbxi.gif

Is this possible through jQuery? Basically, as shown in the image above, I have a blue background, a map image, and text images. I want to achieve this kind of animation when loading a page or loading this image.

+3
source share
5 answers

You want to use a combination of animation () and delay () for each slide just right. Here is an example of what I recently compiled using this.

http://www.panthersweat.com/thursday/

+4
source

, , javscript jquery... - .

var timerCount = 1;
var timer = setInterval('sliderController()',5000);


function sliderController() {
    status = changeSlide(timerCount);
    if(status == 1) {
        timerCount++;
    }
    else{
        timerCount = 1;
    }
}

function changeSlide(timerCount)    {
    if(timerCount != 3) {
        leftValue = -1004 * timerCount;
        $('#banner_slider_container #banner_slides_container').stop().animate({'left':leftValue,'opacity':0.3},'slow',function()    {
            $('#banner_slider_container #banner_slides_container').animate({'opacity':1},'slow');
        });
        return 1;
    }
    else    {
        leftValue = 0;
        $('#banner_slider_container #banner_slides_container').stop().animate({'left':leftValue,'opacity':0.3},'slow',function()    {
            $('#banner_slider_container #banner_slides_container').animate({'opacity':1},'slow');
        });
        return 0;
    }

}

, ...

+2

, jQuery.animate(). / CSS, , , .

http://api.jquery.com/animate/

+1
+1

1.4 jQuery .delay(), . , ?

+1

Source: https://habr.com/ru/post/1754586/


All Articles