>
>< img alt="" src="js/VFX-after.jpg"> Übergang: alle 0,3 Sekunden, 0 Sekunden; >Code kopieren
Der Code lautet wie folgt:
$(function () {
//Outer DIV
var imageWrap = $('. vfx-image-wrap' ),
//Vordergrundbild
topImage = $(this).find('.before-image'),
//Trennlinie
mouseX = e.pageX - offsets.left,
topImage = $(this).find('.before-image'),
divider = $(this).find('.divider-bar'); >if (mouseX < 0) {
mouseX = 0;
} else if (mouseX > fullWidth) {
mouseX = fullWidth
}
$(this).addClass(' „special“);
stayBounce.click (function(){
$(this).toggleClass('stay');
});
imageWrap.on("mouseleave", function () {
if (! StayBounce.hasClass('Stay')) {
Divider.css({ left: '50%', Transition: 'all .3s' });
topImage.css({ width : '50%', Übergang: 'alle .3s' });
}
});