Answer the question
In order to leave comments, you need to log in
Why doesn't jQuery remove the class on Joomla 3.3?
Hello. There is a site on Joomla 3.3, in which some menu items are anchors that link to one page. There is a script that adds a class and highlights the active link (anchor), respectively, when you switch to another anchor, the class is removed and added to another anchor. The problem is that on a test page (not on Joomla), the same script works perfectly. On the site, removeClass does not work. Could there be a problem in Joomla? If not, how to get around it?
Here is the code:
jQuery(document).ready(function(){
$('.menu').click(function(){
$('.menu').removeClass('active');
$(this).addClass('active' );
return false;
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question