I am experimenting with JQuery to create a unique effect where new text pushes the old text down and causes it to vanish. Essentially, it is a stylish text replacement: the new text displaces the old text while making it disappear.
Someone has developed something similar on this JSFiddle.
var slider = $("#slider");
$("#button").on('click', function(){
slider.slideUp(1500, function(){
slider.html("been changed").slideDown(1500);
});
});
However, the provided solution does the reverse. It slides up and makes the previous text disappear. Reversing the methods does not yield the desired result. Is there an alternative approach to accomplish what I intend to do?