I have this pretty simple code that works, but it returns "Uncaught SyntaxError: Unexpected ID" in Chrome VM3197: 1 What should I do to get rid of it? It seems to me that the code suits me ... The only other code that I run is jQuery and the httml5 template fragment to get rid of console errors in the browser that do not support it.
jQuery(document).ready(function($) {
var app = (function () {
var toggleMenu = function(){
var $offcanvasMenu = $('.offcanvas');
$offcanvasMenu.toggleClass('-display');
setTimeout($offcanvasMenu.toggleClass('-show'), 1000);
};
return {
toggleMenu : toggleMenu
};
})();
$('.icon-bars').on('click', function() {
app.toggleMenu();
});
});
source
share