functioning slider transition