if (content_left = "-100vw") {
You're setting the value here instead of testing it. Use ==
or ===
instead. The same goes for the rest of the if
statements.
Your also using outdated content_left
values.
var content_left = $('.content').css('left');
^^ This line should be copied to the beginning of both the moveLeft
and moveRight
functions.