I need to capture as a variable the value of Menu-Item-Text for the
"static selected" item on the Top Navigation bar of a
SharePoint 2013 page. A couple of posts got me close but I can't
seem to get that value. In the html below, I want to capture
"Tools and Resources" as a variable so I can use it. There is
only one "static selected" class among the Top Nav tabs. All
the others are just "status". I'm only interested in the
one that is currently selected. Thanks.
<div id="zz11_motTopNavHolder"
class="s4-tn noindex
ms-core-listMenu-horizontalBox">
<ul
id="zz12_RootAspMenu" class="root
ms-core-listMenu-root static">
<li
class="static
selected"><a class="static selected menu-item
ms-core-listMenu-item ms-displayInline ms-core-listMenu-selected
ms-navedit-linkNode" tabindex="0" title="IT
Support" href="/sites/MOT/IT/Pages/Tools.aspx"
accesskey="1"><span
class="additional-background
ms-navedit-flyoutArrow"><span
class="menu-item-text">Tools and
Resources</span><span
class="ms-hidden">Currently
selected</span></span></a><ul class="static">
1