According to BondyThegreat's observation, it is necessary to switch the positions of Left and Right in the script. Additionally, a modification needs to be made to the style sheet.
<script>
$(document).ready(function(){
$('.container .flying-text').css({opacity:0});
$('.container .active-text').animate({opacity:1, marginRight: "350px"}, 4000);
var int = setInterval(changeText, 5000);
function changeText(){
var $activeText = $(".container .active-text");
var $nextText = $activeText.next();
if($activeText.next().length == 0) $nextText = $('.container .flying-text:first');
$activeText.animate({opacity:0}, 1000);
$activeText.animate({marginRight: "-100px"});
$nextText.css({opacity: 0}).addClass('active-text').animate({opacity:1, marginRight: "350px"}, 4000, function(){
$activeText.removeClass('active-text');
});
}
});
</script>
Please make the following update to the style sheet:
.flying-text{
margin-right:-100px;
text-align:right;
}