I want to animate the background of my website so that when a user enters it, the background starts at 60% and increases to 100% in a few seconds.
I tried using animation in jQuery as shown below, but the console says "Unexpected token -". This worked on opacity in another piece of code.
What am I doing wrong?
$(document).ready(function() {
$('.left-content').animate(
{
background-size: 100%
},
3000);
})
source
share