The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

JS hides the menu buttons for the mobile version.

+2
SarkZKalie
smurfavr
6 posters

Go down

Solved JS hides the menu buttons for the mobile version.

Post by smurfavr July 18th 2019, 12:01 am

This code is used to change the legend of my forum in Bulgarian, but this code currently hides the menu buttons for the mobile version. Can some fix it?

Code:
$(function() {
  var last24 = 'Потребители за последните 24 часа:',
      nobday = 'Няма рожденици днес: ',
      bdaytoday = 'Потребители, които имат рожден ден днес : ',
      nobdaynext7 = 'Няма  рожденици през следващите 7 дни:',
      bdaynext7 = 'Рожденици през следващите 7 дни:',
      legend = 'Легенда:',
      inchat = 'В момента има $1 потребители в чата:',
  who = document.getElementById('whois_online');
  who.innerHTML = who.innerHTML.replace('Members connected during last 24 hours :',last24).replace('No users have a birthday today',nobday).replace('Users having a birthday today',bdaytoday).replace('Users with a birthday within the next 7 days: ',bdaynext7).replace('No users are having a birthday in the upcoming 7 days',nobdaynext7).replace('Legend : ',legend).replace(/There are currently (d+) user(s) on the ChatBox : /,inchat);
});


Last edited by smurfavr on August 7th 2019, 10:20 am; edited 1 time in total
smurfavr
smurfavr
Active Poster

Male Posts : 1883
Reputation : 22
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: JS hides the menu buttons for the mobile version.

Post by SarkZKalie July 20th 2019, 2:28 am

I can see menu button on mobile platform. Have you ever tried to clear the browser cache before re-loading your site?

JS hides the menu buttons for the mobile version. Mobile10


JS hides the menu buttons for the mobile version. Sarkzk10
SarkZKalie
SarkZKalie
Support Moderator
Support Moderator

Male Posts : 1418
Reputation : 220
Language : English

https://rotavn.forumotion.com/

Back to top Go down

Solved Re: JS hides the menu buttons for the mobile version.

Post by SLGray July 20th 2019, 2:55 am

I believe the member has removed it.


JS hides the menu buttons for the mobile version. Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51489
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Solved Re: JS hides the menu buttons for the mobile version.

Post by skouliki July 24th 2019, 11:28 am

is this solved ?
skouliki
skouliki
Manager
Manager

Female Posts : 15133
Reputation : 1696
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: JS hides the menu buttons for the mobile version.

Post by Ape July 24th 2019, 8:49 pm

The member asked me to help find the problem codes and I found this code that was the problem and then told the member to ask you the members to help find the problem in the code.

The problem no longer shows up on the forum as I removed the code to stop the problem in the first place.

All the member needs is for the code posted in the first topic fixed so it will work again and not remove the tools for mobile users.


JS hides the menu buttons for the mobile version. Left1212JS hides the menu buttons for the mobile version. Center11JS hides the menu buttons for the mobile version. Right112
JS hides the menu buttons for the mobile version. Ape_b110
JS hides the menu buttons for the mobile version. Ape1010
Ape
Ape
Administrator
Administrator

Male Posts : 19122
Reputation : 1993
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Back to top Go down

Solved Re: JS hides the menu buttons for the mobile version.

Post by smurfavr July 24th 2019, 8:50 pm

SarkZKalie wrote:I can see menu button on mobile platform. Have you ever tried to clear the browser cache before re-loading your site?

I have removed the code to see the button for the mobile version.

@APE helped me to find the problem I'm grateful for.
smurfavr
smurfavr
Active Poster

Male Posts : 1883
Reputation : 22
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: JS hides the menu buttons for the mobile version.

Post by smurfavr July 30th 2019, 12:01 am

Up
smurfavr
smurfavr
Active Poster

Male Posts : 1883
Reputation : 22
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: JS hides the menu buttons for the mobile version.

Post by smurfavr August 6th 2019, 10:32 am

Up
smurfavr
smurfavr
Active Poster

Male Posts : 1883
Reputation : 22
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: JS hides the menu buttons for the mobile version.

Post by Storyteller of Wonderland August 6th 2019, 10:39 am

smurfavr wrote:Up

Good day!

Sorry, I don’t understand what is your problem?

Can you show me what you want in the screenshots? It seems to me that this is all easy to do.
Storyteller of Wonderland
Storyteller of Wonderland
Forumember

Female Posts : 108
Reputation : 10
Language : Russian, German, French, English.
Location : Russia

http://milanwake.forum2x2.ru

Back to top Go down

Solved Re: JS hides the menu buttons for the mobile version.

Post by Guest August 6th 2019, 11:09 am

Hello,

The problem is most probably the fact that the code tries to modify the legend even on mobile, despite the fact that there is no legend there.
You can try replacing it with this:
Code:
document.addEventListener('DOMContentLoaded', function(){
var last24 = 'Потребители за последните 24 часа:',
nobday = 'Няма рожденици днес: ',
bdaytoday = 'Потребители, които имат рожден ден днес : ',
nobdaynext7 = 'Няма  рожденици през следващите 7 дни:',
bdaynext7 = 'Рожденици през следващите 7 дни:',
legend = 'Легенда:',
inchat = 'В момента има $1 потребители в чата:',
who = document.getElementById('whois_online');
if(who===null) return false;
who.innerHTML = who.innerHTML.replace('Members connected during last 24 hours :',last24).replace('No users have a birthday today',nobday).replace('Users having a birthday today',bdaytoday).replace('Users with a birthday within the next 7 days: ',bdaynext7).replace('No users are having a birthday in the upcoming 7 days',nobdaynext7).replace('Legend : ',legend).replace(/There are currently (d+) user(s) on the ChatBox : /,inchat);
});
It will check to see if the legend exists before trying to modify it.
avatar
Guest
Guest


Back to top Go down

Solved Re: JS hides the menu buttons for the mobile version.

Post by smurfavr August 6th 2019, 1:51 pm

Thank you @Occultist now works.
I noticed that the forumotion team added a translation for most things. If you can make the code translate only this caption.

Рожденици през следващите 7 дни


Last edited by smurfavr on August 7th 2019, 10:22 am; edited 1 time in total
smurfavr
smurfavr
Active Poster

Male Posts : 1883
Reputation : 22
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: JS hides the menu buttons for the mobile version.

Post by Guest August 6th 2019, 8:50 pm

Yeah sure. Try this code:
Code:
        document.addEventListener('DOMContentLoaded', function(){
var bdaynext7='Рожденици през следващите 7 дни:';
var who=document.getElementById('whois_online');
if(who===null) return false;
who.innerHTML=who.innerHTML.replace('Users with a birthday within the next 7 days: ',bdaynext7);
});
avatar
Guest
Guest


Back to top Go down

Solved Re: JS hides the menu buttons for the mobile version.

Post by smurfavr August 7th 2019, 10:20 am

Thank you @Occultist
smurfavr
smurfavr
Active Poster

Male Posts : 1883
Reputation : 22
Language : Bulgarian

http://smurfa.bulgarianforum.net/

Back to top Go down

Solved Re: JS hides the menu buttons for the mobile version.

Post by skouliki August 7th 2019, 11:30 am

Problem solved & topic archived.
Please read our forum rules:  ESF General Rules
skouliki
skouliki
Manager
Manager

Female Posts : 15133
Reputation : 1696
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum