hi @atonu, what do you want to achieve?
Thread Starter
atonu
(@atonu)
hey @konrads, please visit my site http://www.davpsmidnapore.in , you can see my pages are load with ajax but menu isn’t refreshing. I have used ADVANCED AJAX PAGE LOADER plugin for this ajax effect. This plugin has a field to enter the click code. I need the click code for my site. From the support of this plugin i found the click but the thing is that in the code below i need to enter the class names for the theme i am using (Custom Community by Themekraft). Lastly the problem is that i can’t match the classes of this theme with the click code below.
//menu item changer if your using "Suffusion" theme
jQuery('ul.sf-menu li').each(function() {
jQuery(this).removeClass('current_page_item');
jQuery(this).find('a').removeClass('current');
});
jQuery(thiss).parents('li').addClass('current_page_item');
jQuery('li.current_page_item a').addClass('current');
@ atonu, not sure, firstly i must admit i am not good in jquery.. :/
then regarding the CSS classes i can help, but need to know what exactly you want to achieve with this click code.
For example:
When the page reloads, add this or that class to this or that element..
maybe you just wanted this one (i just changed one class, the rest is similar standard wordpress classes)
//menu item changer if your using "Suffusion" theme
jQuery('ul.sf-menu li').each(function() {
jQuery(this).removeClass('current_page_item');
jQuery(this).find('a').removeClass('current');
});
jQuery(thiss).parents('li').addClass('current_page_item');
jQuery('li.current_page_item a').addClass('current');
Let me know if this helps or what exactly you wanted..
konrad
ah wait i think this seems to work already and you just need to have the click code to remove the classes when they are not active anymore!
but can’t help you out with the jQuery thing by myself.. sorry..
maybe the hint helps already, let me know, konrad
Thread Starter
atonu
(@atonu)
hey konrad,
nothing seems to work, thanks for your help.
if you find something that you think may work please let me know.