Hello can't solve the error in the console Uncaught SyntaxError: Unexpected token {?

5c9a3bdfd811f358854412.png On the screenshot you can see that error shop-script.js:70 but I removed this code the console indicated parenthesis after the toggle but after removal still shows this error
($('.top-auth').toggle{
function(){
$(".top-auth").attr("id","active-button");
$("#block-top-auth").fadeIn(200);
},
function(){
$(".top-auth").attr("id","");
$("#block-top-auth").fadeOut(200);
}
};
Here is the entire code
$(document).ready(function(){
$("#newssticker").jCarouselLite({
vertical:true,
hoverPause:true,
btnPrev:"#nextnews1",
btnNext: "#nextnews2",
visible:2,
auto:3000,
speed:500,
});

$("#style-grid").click(function(){

$("#block-tovar-grid").show();
$("#block-tovar-list").hide();
$("#style-grid").attr("src","/img/100.png");
$("#style-list").attr("src","/img/photo_2019-03-15_02-03-24.jpg");
$.cookie('select_style','grid');
});

$("#style-list").click(function(){
$("#block-tovar-grid").hide();
$("#block-tovar-list").show();
$("#style-list").attr("src","/img/100(2).png");
$("#style-grid").attr("src","/img/photo_2019-03-15_02-03-14.jpg");
$.cookie('select_style','list');
});
if($.cookie('select_style') == 'grid')
{
$("#block-tovar-grid").show();
$("#block-tovar-list").hide();
$("#style-grid").attr("src","/img/100.png");
$("#style-list").attr("src","/img/photo_2019-03-15_02-03-24.jpg");
}
else
{
$("#block-tovar-grid").hide();
$("#block-tovar-list").show();
$("#style-list").attr("src","/img/100(2).png");
$("#style-grid").attr("src","/img/photo_2019-03-15_02-03-14.jpg");
}

$("#select-sort").click(function(){
$("#sorting-list").slideToggle(200);

});
$('#block-category > ul > li >a').click(function(){
if ($(this).attr('class') != 'active'){
$('#block-category > ul > li >ul').slideUp(400);
$(this).next().slideToggle(400);

$('#block-category > ul > li >a').removeClass('active');
$(this).addClass('active');
$.cookie('select_cat',$(this).attr('id'));
}
else
{
$('#block-category > ul > li >a').removeClass('active');
$('#block-category > ul > li >ul').slideUp(400);
$.cookie('select_cat',");
}
});
if ($.cookie('select_cat') != ")
{
$('#block-category > ul > li > #'+$.cookie('select_cat')).addClass('active').next().show();
}
});
March 19th 20 at 08:41
1 answer
March 19th 20 at 08:43
Solution
Here is the bracket:
OSZumn9.png

Likely instead to be circular.

If you press on these letters, you will be shown the exact place with mistake.
LnMDZWa.png
I removed all the code but the console still gives this error - alberto.Mueller commented on March 19th 20 at 08:46
It is not in the code but it still shows in the console5c9a3f0d125b0997323122.png - alberto.Mueller commented on March 19th 20 at 08:49
@alberto.Mueller, the cache dropped? - germaine98 commented on March 19th 20 at 08:52
Tried happened thanks - alberto.Mueller commented on March 19th 20 at 08:55
@alberto.Mueller, thank you need to note the decision of the question - Marilie.Kertzmann28 commented on March 19th 20 at 08:58
I am a beginner as you need to note the decision of a question - alberto.Mueller commented on March 19th 20 at 09:01
@alberto.Mueller, the button "mark as solution" - Kaelyn.Cummerata commented on March 19th 20 at 09:04

Find more questions by tags JavaScript