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 March 2nd 2016, 11: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 March 3rd 2016, 5: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 March 3rd 2016, 6: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 : 51600
Reputation : 3527
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 March 3rd 2016, 5: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 March 3rd 2016, 7: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 : 51600
Reputation : 3527
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 March 3rd 2016, 9: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 March 9th 2016, 11: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