Forum Support

Shape 5
March 28, 2024, 02:21:17 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Shape 5 Forum
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: span classes in navigation menu disable smooth scrolling effect  (Read 670 times)
thaimacky
Jr. Member
**
Offline Offline

Posts: 34



« on: August 22, 2015, 04:21:00 PM »

the native menus in this theme look like this:

Quote
<a class="_mPS2id-h" rel="m_PageScroll2id" href="/#modernes-webdesign">  <span onclick="window.document.location.href='/#modernes-webdesign'">Angebot </span> [/url]


for this part:

Quote
<span onclick="window.document.location.href='/#modernes-webdesign'"></span>

...it seems like there is no use for it apart from destroying the smooth scrolling effect of the plugin "Page scroll to id" i use in that theme. when i delete that span-part in the "inspect element browser tool" the smooth scrolling works perfectly.

the code looks like this after i delete the span class and the menu looks and behaves the same as before apart from the smooth scrolling that works now:

Quote
<a class="_mPS2id-h" rel="m_PageScroll2id" href="/#modernes-webdesign"> Angebot[/url]

so, does the span class do something usefull or can i delete it....aaand if it is not needed, how can i delete it?

the site (which is still under construction) is here http://neue-webseite.ch and the menu link with the smooth scrolling effect that does only work smoothly without the above span class is the first one called "angebot"...
« Last Edit: August 22, 2015, 04:42:30 PM by thaimacky » Logged
Tristan Rineer
Global Moderator
*****
Offline Offline

Posts: 3858

Gravatar


« Reply #1 on: August 24, 2015, 02:40:54 PM »

The span allows users on touch-screen devices to access sub-menus; without it, tapping on the menu item would always follow the link; with it, there will be an arrow for menu items with submenus, and tapping the arrow will expand the submenu.

The framework actually has smooth-scroll built in, but it's designed to only work with HTML elements that have an ID starting with "s5_".

As for actually removing the spans, I forwarded your question to one of the devs that worked on the menu, here's the response:

Quote
If he's asking if he can easily remove the surrounding spans, the answer is no, it's part of the framework. First, if he wants to hack up the menu that's on him to do so, we can't support that. There is an A and a Span inside of it for when there are sub menus. The arrow is set as the background of the A, and the Span surrounds only the text. That allows the arrow and the text to have two different trigger methods, which means the user can open the sub menu on touch screen devices by clicking the arrow (A) and open that specific menu link of the Span by clicking on the text. Otherwise there would be no way to open a sub menu, it would always open the link of the parent item.

His site has no sub menus so if wants to modify the framework to remove it, he can, but that's totally on him to do so.


I hope that is helpful information.
Logged

Tristan Rineer
------------
Shape 5 Team



- Need a great host for your website? We highly recommend siteground.com!


- Put your trust in the hands of our extremely qualified staff to get your job done right!


- Firebug is the most powerful web development and debugging tool, and it will save you a lot of time, frustration and forum questions:
Install Firebug
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2013, Simple Machines
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Looking for the largest variety in template designs? Look no more. Never buy 1 theme again. Signups start at just $89 for access to all of our themes.
Send Us An Email
Please send us your questions and we will email you back as soon as we can. Product support questions should be posted in our support forums under the Help menu. Our staff will assist you from there.