The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Mobile Homepage Dropdown Toolbar

View previous topic View next topic Go down

Mobile Homepage Dropdown Toolbar

Post by Dr.Intern on 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

Dr.Intern
Forumember

Posts : 77
Reputation : 3
Language : English

Back to top Go down

Re: Mobile Homepage Dropdown Toolbar

Post by SLGray on March 3rd 2016, 6:32 am

Are you referring to the toolbar?


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


SLGray
Administrator
Administrator

Male Posts : 36729
Reputation : 2446
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

Re: Mobile Homepage Dropdown Toolbar

Post by Dr.Intern on March 3rd 2016, 5:02 pm

Yes the dropdown toolbar for mobile.

Dr.Intern
Forumember

Posts : 77
Reputation : 3
Language : English

Back to top Go down

Re: Mobile Homepage Dropdown Toolbar

Post by SLGray on March 3rd 2016, 7:09 pm

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


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


SLGray
Administrator
Administrator

Male Posts : 36729
Reputation : 2446
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

Re: Mobile Homepage Dropdown Toolbar

Post by Dr.Intern on 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.

Dr.Intern
Forumember

Posts : 77
Reputation : 3
Language : English

Back to top Go down

Re: Mobile Homepage Dropdown Toolbar

Post by Dr.Intern on March 9th 2016, 11:14 pm

Bump

Dr.Intern
Forumember

Posts : 77
Reputation : 3
Language : English

Back to top Go down

View previous topic View next topic Back to top


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