I am currently working on a Joomla CMS Website that is quite large in scale.
Issue: My main problem right now is figuring out how to hide a particular menu tab across the entire site. Unfortunately, this specific menu item does not have a unique identifier or class; it shares the same class as other tabs that I want to keep visible. The tab I wish to remove appears in the 4th position in about 70% of instances, so I initially tried using the following code snippet:
.tabs:nth-of-type(4)
{
display:none !important;
}
However, since the order varies, this approach did not yield the desired results. The targeted tab that needs to be hidden looks like the example below within the markup:
Update: Despite attempting the suggestions provided below, the current implementation is not effective:
$(document).ready(function() {
$('.djaccTitle:contains("Location").css( "display: none;" )')
});
<span class="tabs">Location</span>
Is there a more streamlined solution, such as utilizing an if statement, that can detect text content within a class and then hide the element based on certain criteria?
I am hoping to discover an efficient method like this rather than manually sifting through thousands of markup files. Any guidance on this matter would be greatly appreciated. Thank you!
Update: Despite trying the suggestions provided thus far, the current implementation remains ineffective:
$(document).ready(function() {
$('.tabs:contains("Location").css( "display: none;" )')
});