I need to use a custom.js override file to add a new link to an unordered list on three pages. I must use jquery, per the systems requirements, and finding a way to select and insert is really numbing my brain.
Here is the menu block itself:
<div class="nav-block nav-block-logo">
<div class="nav-block-body">
<div class="nav-block-content">
<div class="logo">
<a href="/"><img src="logo.png"></a>
</div>
<h2>Contact Us</h2>
<ul>
<li class="active">
<a href="/contact-us/">Overview</a>
</li>
<li>
<a href="/contact-us/contact-us">Contact Us</a>
</li>
<li class="last-child">
<a href="/contact-us/facilities-and-directions">Facilities & Directions</a>
</li>
</ul>
<a href="http://www.addthis.com/bookmark.php" class="bookmark-share addthis_button">Bookmark & Share</a>
</div>
</div>
</div>
I need to add a new li link at the end. I've tried after() and append(), and neither have worked. I was told I may need to target the h2 and check to see if the title is "contact us" or not. Not sure how to do this either.
I am relatively new to jquery, and this was kinda dumped on me at last minute. Any help would be greatly appreciated!