Quantcast
Channel: 916 Networks
Viewing all articles
Browse latest Browse all 63

JQUERY Code to Remove a tags based on content

$
0
0

I recently had been requested to hack Joomla 1.0.15 to hide a navigation menu tree from logged in users. That is not possible with that version of Joomla – support was introduced with Joomla 1.6.

I was looking for a reliable, pain-free way and found it.

I modified the index.php in the root of my theme folder, and used the following JQUERY to hide the a tag with menu item name given by the client.

Note that we were hiding this content because logged in users get other menu items that the public doesn’t get, so the item below just didn’t fit on the logged in users menu bar.

I plugged into Joomla here for logged in users:

if ( $my->id ) {
initEditor();

And used the following JQUERY:

$(document).ready(function() {
$("li a:contains('Public Content')").hide();
});

Works like a champ!

The post JQUERY Code to Remove a tags based on content appeared first on 916 Networks.


Viewing all articles
Browse latest Browse all 63

Trending Articles