Menu icon disaspears on mobile mode

When working on Bootstrap studio and doing a preview on my browser, the mobile icon is visible and working when I click it . However when I uploaded my site online kimsstudioinvites.com the burger menu is visible, but now when i click it … it dissapears and displays a no image icon instead. I don’t understand how this happened and would be appreciate any help and suggestion. Many thanks!

this is the java script i used under BSS:
var image_tracker = ‘c’;
function change(){
var image = document.getElementById(‘social’);
if(image_tracker==‘c’){
image.src = ‘XMARKSTHESPOT2.png’;
image_tracker = ‘n’}else{
image.src = ‘XMARKSTHESPOT.png’;
image_tracker = ‘c’;
}
}

My aim is make my icon change from a burger menu to a X, and revert it back once clicked. It works fine in offline mode but i do not understand why its buggy when i upload on server.

Try changing your code to this:

var image_tracker = ‘c’;
function change(){
var image = document.getElementById(‘social’);
if(image_tracker==‘c’){
image.src = ‘assets/img/XMARKSTHESPOT2.png’;
image_tracker = ‘n’}else{
image.src = ‘assets/img/XMARKSTHESPOT.png’;
image_tracker = ‘c’;
}
}
1 Like

Hi Richard,

This worked thanks to you!. at first i tried ‘assets/img/XMARKSTHESPOT.png’ like you suggested, but it did not work… so i used " instead of ’ and it works fine now. From what i learned ’ should be fine, maybe new updates on the language? learning language is not easy for me and i find it funny /exiting to troubleshoot problems. anyways, i am so happy for your help.