lib/core/client_alchemy.js
function markLinkElement(element, active_nr) {

	var mark_wrapper;

	// Always remove the current classes
	element.classList.remove('active-link');
	element.classList.remove('active-sublink');

	if (element.parentElement && element.parentElement.classList.contains('js-he-link-wrapper')) {
		markLinkElement(element.parentElement, active_nr);
	}

	if (!active_nr) {
		return;
	}

	if (active_nr == 1) {
		element.classList.add('active-link');
	} else if (active_nr == 2) {
		element.classList.add('active-sublink');
	}
}
function markLinkElement(element, active_nr) {

	var mark_wrapper;

	// Always remove the current classes
	element.classList.remove('active-link');
	element.classList.remove('active-sublink');

	if (element.parentElement && element.parentElement.classList.contains('js-he-link-wrapper')) {
		markLinkElement(element.parentElement, active_nr);
	}

	if (!active_nr) {
		return;
	}

	if (active_nr == 1) {
		element.classList.add('active-link');
	} else if (active_nr == 2) {
		element.classList.add('active-sublink');
	}
}
function markLinkElement ( element , active_nr ) { var mark_wrapper ; // Always remove the current classes element . classList . remove ( 'active-link' ) ; element . classList . remove ( 'active-sublink' ) ; if ( element . parentElement && element . parentElement . classList . contains ( 'js-he-link-wrapper' ) ) { markLinkElement ( element . parentElement , active_nr ) ; } if ( ! active_nr ) { return ; } if ( active_nr == 1 ) { element . classList . add ( 'active-link' ) ; } else if ( active_nr == 2 ) { element . classList . add ( 'active-sublink' ) ; } }
Mark element as active or not

@author    Jelle De Loecker   <jelle@develry.be>
@since     0.3.0
@version   0.3.0

@param     {Element}   element
@param     {Number}    active_nr
Mark element as active or not