Forum Support

 
Advanced Search


New Posts
FAQs for Wordpress
If you have a question about Wordpress products please read through a list of our most commonly asked questions here.
[1]

Offline thaimacky
Free Member
Posts: 34

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

Offline Tristan Rineer
Free Member
Posts: 3858

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
[1]

Jump to:  


Powered by SMF | SMF © 2013, Simple Machines
Joomla Bridge by JoomlaHacks.com
Page created in 0.018 seconds with 22 queries.
Need some help getting your site up and running? Be sure to check out our tutorials area, post on the forum or hire us
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.