I have a site that's CMS has very limited menu control. As such I'm trying to work around these problems with jQuery to display the menu how I want. I know it will still be in the HTML but as long as it's displaying the way I want it will be fine (at least for my standards).
The menu in question currently looks something like this.
<div id="sidemenu">
<ul>
<li class="childlist">
<a href="#">GET RID OF THIS PARENT</a>
<ul>
<li>Show this</li>
<li>Show this</li>
<li>Show this</li>
</ul>
</li>
</ul>
</div>
I have achieved what I want with the simple $('a:contains(GET RID OF THIS PARENT)').hide(); however the menu is being pulled into two locations and I only want to hide the one in the sidemenu div.
I have tried this approach:
$side = $('#sidemenu');
$hidethis = $('$side:contains('GET RID OF THIS PARENT')');
$hidethis.hide();
But this crashes the page (I've been playing around in the console in Chrome to try to get a solution)
I will be the first to admit my javascript is terrible so any assistance would be well received.
Thanks in advance.