Code help.

Hello,
I am using a sticky header on the desktop page but in Mobile i dont want it to appear.
Could you tell me whats wrong in this code? For some reason its pointing me the last line "}) (unexpected token).
When i switch to Mobile, it also points out error in every lines. (only in mobile)
Regards

$w.onReady(function () {
// Write your code here
$w(“#headertransition”).onViewportLeave(() => {
$w(“#scrollingheader”).show();
$w(“#defaultheader”).hide();
})
$w(“#headertransition”).onViewportEnter(() => {
$w(“#defaultheader”).show();
$w(“#scrollingheader”).hide();
})
if(wixWindow.formFactor === “Mobile”){
$w(“#scrollingheader”).hide();

})

Hi it looks like you are missing a curly braces. I think it should be like this:

$w.onReady(function () {
// Write your code here
$w(" #headertransition “).onViewportLeave(() => {
$w(” #scrollingheader “).show();
$w(” #defaultheader “).hide();
})
$w(” #headertransition “).onViewportEnter(() => {
$w(” #defaultheader “).show();
$w(” #scrollingheader “).hide();
})
if(wixWindow.formFactor === “Mobile”){
$w(” #scrollingheader ").hide();
} // ← here
})