In this tutorial I show how to create an animated looping ticker with Divi by just adding a bit of code.
<style>
.customTicker{
color:white;
padding-right:10px;
display: inline-block;
}
@keyframes customTicker {
0% {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
visibility: visible;
}
100% {
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
}
}
</style>
<script>
jQuery(function($){
var copies = 10;
var speed = "1s";
var item = $(".customTicker");
var itemParent = item.parent();
itemParent.css({
"white-space":"nowrap",
"overflow-x":"hidden"
});
for (var i = 0; i < 10; i++) {
item.clone().appendTo(itemParent);
};
item.remove();
$(".customTicker").css({
"-webkit-animation-name": "customTicker",
"animation-name": "customTicker",
"-webkit-animation-iteration-count": "infinite",
"animation-iteration-count": "infinite",
"-webkit-animation-timing-function": "linear",
"animation-timing-function": "linear",
"-webkit-animation-duration": speed,
"animation-duration": speed
})
})
</script>