paulovargatt
7/31/2017 - 1:55 PM

Rotate Imgs - Example porn sites

Rotate Imgs - Example porn sites

$(document).on("mouseover", ".rotate", function() {
    var a = $(this),
            b = $(this).attr("src"),
            c = b.substr(0, b.length - 5);
        StartImageRotate(a, c, ".png"), $(this).mouseout(function() {
            a.attr("src", b), stopImageRotate()
        })
    });


function StartImageRotate(a, b, c) {
    imgNum = 1, changePic(b, c, a), thumbChange = setInterval(function() {
        changePic(b, c, a)
    }, 500)
}

function changePic(a, b, c) {
    imgNum > 10 && (imgNum = 1), c.attr("src", a + imgNum + b), imgNum++
}

function stopImageRotate() {
    clearInterval(thumbChange), imgNum = 1
}