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.

Mobile Homepage Dropdown Toolbar

2 posters

Go down

Mobile Homepage Dropdown Toolbar Empty Mobile Homepage Dropdown Toolbar

Post by Dr.Intern Wed Mar 02, 2016 10:12 pm

I was wondering if there is a way for me to get the mToggleContainer to show up on the homepage for mobile viewers. It shows up once a user enters a section. 

I've tried to append the existing html into the homepage, but that didn't work. It just inserts the arrow which doesn't do anything when clicked. I assume I'm missing the script for the link press action. 

Code:
$(window).load(function() {
   if (document.getElementsByClassName('mobile_title') && !document.getElementById('mToggleContainer')) {
      var wrapper = document.createElement("div");
      wrapper.id = 'mToggleContainer';
      wrapper.innerHTML = '<a id="mToggleArrow" class="hiddenBar" href="#">&nbsp;</a><ul id="mNavbar"><li><a class="navElement" href="/"><span class="navBtnIcon" style="background-position:-32px 0;">&nbsp;</span><br><span class="navBtnLabel">Home</span></a></li><li><a class="navElement" href="/login"><span class="navBtnIcon" style="background-position:-64px 0;">&nbsp;</span><br><span class="navBtnLabel">Log in</span></a></li><li><a class="navElement" href="index.forum?mobile&amp;redirect=%2Ff19-announcements-and-news"><span class="navBtnIcon" style="background-position:0 0;">&nbsp;</span><br><span class="navBtnLabel">Classic version</span></a></li></ul>';

      var targetDiv = document.getElementById("top").getElementsByClassName("mobile_title")[0].appendChild(wrapper);
   }
});

P.S. This would be a nice feature to have by default.


Last edited by Dr.Intern on Thu Mar 03, 2016 4:03 pm; edited 1 time in total
avatar
Dr.Intern
Forumember

Posts : 77
Reputation : 3
Language : English

Back to top Go down

Mobile Homepage Dropdown Toolbar Empty Re: Mobile Homepage Dropdown Toolbar

Post by SLGray Thu Mar 03, 2016 5:32 am

Are you referring to the toolbar?


Mobile Homepage Dropdown Toolbar 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 : 51556
Reputation : 3519
Language : English
Location : United States

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

Back to top Go down

Mobile Homepage Dropdown Toolbar Empty Re: Mobile Homepage Dropdown Toolbar

Post by Dr.Intern Thu Mar 03, 2016 4:02 pm

Yes the dropdown toolbar for mobile.
avatar
Dr.Intern
Forumember

Posts : 77
Reputation : 3
Language : English

Back to top Go down

Mobile Homepage Dropdown Toolbar Empty Re: Mobile Homepage Dropdown Toolbar

Post by SLGray Thu Mar 03, 2016 6:09 pm

It should appear automatically for mobile users any if they are not logged in.


Mobile Homepage Dropdown Toolbar 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 : 51556
Reputation : 3519
Language : English
Location : United States

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

Back to top Go down

Mobile Homepage Dropdown Toolbar Empty Re: Mobile Homepage Dropdown Toolbar

Post by Dr.Intern Thu Mar 03, 2016 8:24 pm

It doesn't on the home page though. It does for all the subforums posts etc. But on the homepage it isn't showing up. I've tested on three devices while logged in and not.
avatar
Dr.Intern
Forumember

Posts : 77
Reputation : 3
Language : English

Back to top Go down

Mobile Homepage Dropdown Toolbar Empty Re: Mobile Homepage Dropdown Toolbar

Post by Dr.Intern Wed Mar 09, 2016 10:14 pm

Bump
avatar
Dr.Intern
Forumember

Posts : 77
Reputation : 3
Language : English

Back to top Go down

Back to top

- Similar topics

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