Avatar of Member_2_7966896
Member_2_7966896
 asked on

Getting value of <li> using JQuery/JS

I am trying to get the whatever option is clicked values inside the <li> starting from "Advanced" all way to "Status" and "Properties" to "ProdSimple" and "Linked Servers" all way to "SDBUsers" and "Paging Analysis" all way to "RepCmp"

  <nav role="navigation" class="navbar navbar-custom">
      <div class="container-fluid">
          <div class="navbar-header">
            <button type="button" data-target="#navbarCollapse" data-toggle="collapse" class="navbar-toggle">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
          <a class="navbar-brand" href="#"><img src="images/database_brand.png" alt="Database" /></a>
        </div>
          <div id="navbarCollapse" class="collapse navbar-collapse">
            <ul class="nav navbar-nav">
                <li id="prm_lnk" class="active"><a href="#">Dashboard</a></li>
                                
                <li class="dropdown" > <a href="#" data-toggle="dropdown">Reports <b class="caret"></b></a>
                    <ul class="dropdown-menu">
                      <li class="dropdown-submenu"><a href="#" tabindex="-1" data-toggle="dropdown">Instance</a>
                        <ul  class="dropdown-menu">
                          <li><a href="#" tabindex="-1">Advanced</a></li>
                          <li'><a href="#" tabindex="-1" id ="agent">Agent</a></li>
                          <li><a href="#" tabindex="-1">General</a></li>
                          <li><a href="#" tabindex="-1">ServerConfig</a></li>
                          <li><a href="#" tabindex="-1">Restart</a></li>
                          <li><a href="#" tabindex="-1">Local Date and Time</a></li>
                          <li><a href="#" tabindex="-1">Alerts & Operators</a></li>
                          <li><a href="#" tabindex="-1">Mail Status</a></li>
                          <li><a href="#" tabindex="-1">Status</a></li>

                        </ul>
                      </li>
                      <li class="dropdown-submenu"><a href="#" tabindex="-1" data-toggle="dropdown">Database</a>
                        <ul class="dropdown-menu">
                          <li><a href="#" tabindex="-1">Properties</a></li>
                          <li><a href="#" tabindex="-1">Backup Properties</a></li>
                          <li><a href="#" tabindex="-1">File Properties</a></li>
                          <li><a href="#" tabindex="-1">Partitioning</a></li>
                          <li><a href="#" tabindex="-1">BackupSizes</a></li>
                          <li><a href="#" tabindex="-1">ProdSimple</a></li>
                        </ul>
                      </li>
                       <li class="dropdown-submenu"><a href="#" tabindex="-1" data-toggle="dropdown">Security</a>
                        <ul class="dropdown-menu">
                          <li><a href="#" tabindex="-1">Linked Servers</a></li>
                          <li><a href="#" tabindex="-1">Local Administrators</a></li>
                          <li><a href="#" tabindex="-1">Logins Not Used</a></li>
                          <li><a href="#" tabindex="-1">Orphaned Users</a></li>
                          <li><a href="#" tabindex="-1">SysAdmins</a></li>
                          <li><a href="#" tabindex="-1">ServerRole Members</a></li>
                          <li><a href="#" tabindex="-1">Blank Passwords</a></li>
                          <li><a href="#" tabindex="-1">AgentProxy</a></li>
                          <li><a href="#" tabindex="-1">SLogins</a></li>
                          <li><a href="#" tabindex="-1">SDBUsers</a></li>
                        </ul>
                      </li>
                         <li class="dropdown-submenu"><a href="#" tabindex="-1" data-toggle="dropdown">Logs</a>
                        <ul class="dropdown-menu">
                          <li><a href="#" tabindex="-1">Paging Analysis</a></li>
                          <li><a href="#" tabindex="-1">Paging Details</a></li>
                          <li><a href="#" tabindex="-1">RepCmp</a></li>
                        </ul>
                      </li>
<%--                      <li><a href="#" tabindex="-1">Oracle Reports</a></li>                     --%>
                    </ul>
                  </li>
            </ul> 

Open in new window

HTMLJavaScriptjQueryBootstrap

Avatar of undefined
Last Comment
Member_2_7966896

8/22/2022 - Mon
SOLUTION
Ess Kay

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
Scott Fell

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Member_2_7966896

ASKER
Thank you guys! Exactly what I was looking for.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes