jQuery NorList - highlight active top Section.

jQuery based dynamic fly-out menu.
Post Reply
norman
Site Admin
Posts: 1252
Joined: Sat Feb 07, 2004 9:55 pm

jQuery NorList - highlight active top Section.

Post by norman »

This is for the jQuery based NorList. NorList V4 onwards.

To highlight the parent top-section of the current page do the following:
Go to Design / Library / Layouts / NorList Menu / NorList Support Code.
The bottom few lines should be:

Code: Select all

		</actinic:block>
	});
</script>
Amend them to be:

Code: Select all

		</actinic:block>
		var topSection = '<actinic:block type="ParentSectionList"><actinic:block if="%3cactinic%3avariable%20name%3d%22ListIndex%22%20%2f%3e%20%3d%3d%201"><actinic:variable name="SectionName" encoding="perl" selectable="false" /></actinic:block></actinic:block>';
		$('ul#norlist > li > a').each(function(){if($(this).text() == topSection) $(this).css('color', 'red');});
	});
</script>
The 'color', 'red' above will make the relevant entry red. Amend to suit. E.g. 'font-weight', 'bold' will make it bold.

N.B. such tweaks are unsupported.
Norman
Post Reply