[TYPO3-german] Re: Einsteigspunkt in H-MENU mit einbeziehen

Matthias Eberlein skydivematy at gmail.com
Mon Jan 9 15:57:48 CET 2017


Hallo Paul,
ich mache immer mein setup mit shortcut auf root und verwende ein javascript snippet:

function active_HomeLink_init() {
	// Set Home Link to Active when on Home Page
	$('.main-menu li').each(function () {
		var href = jQuery(this).find('a').attr('href');
		if (href === window.location.pathname) {
			if ($(this).is(":not(.active_menu_item)")) {
				$(this).addClass('active_menu_item is-active');
			}
		}
	});
}
active_HomeLink_init();

Gruß
maty


More information about the TYPO3-german mailing list