I am currently incorporating the Textillate plugin for text animation in my web application. However, I am encountering a Syntax error in Eclipse when defining the JavaScript for the animation, particularly with the 'in' definition. How can I resolve this issue and prevent Eclipse from throwing a syntax error?
Syntax Error
Syntax error on token "in", IntegerLiteral expected
Code
$(function () {
$('.userOption').textillate({
selector: '.texts', // default selector used when detecting multiple texts to animate
loop: true, // enable looping
minDisplayTime: 2000, // sets the minimum display time for each text before replacement
initialDelay: 0, // sets the initial delay before animation starts
autoStart: true, // determine if animation should start automatically
inEffects: [], // custom set of 'in' effects
outEffects: [ 'rollOut' ], // custom set of 'out' effects
// in animation settings
in: {
effect: 'rotateInUpLeft', // set the effect name
delayScale: 1.5, // set the delay factor for each consecutive character
delay: 50, // set the delay between each character
sync: false, // animate all characters simultaneously
shuffle: false // randomize character sequence (shuffle not applicable with sync = true)
},
// out animation settings
out: {
effect: 'rollOut',
delayScale: 1.5,
delay: 50,
sync: false,
shuffle: true,
}
});
});