WordPress.org

Ready to get started?Download WordPress

Forums

Custom Community
jquery click code for Advanced AJax Page Loader plugin (6 posts)

  1. atonu
    Member
    Posted 1 year ago #

    [Moderator note: stop posting your problems in others' threads.]

    Please give me the click code with the classes of Custom Community theme by Themekraft. here is whet i've got by serching but this code needs to be edited, the classes needs to be replaced by this theme's classes.
    Please help me
    Thanks a lot

    //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');
  2. konradS
    Member
    Posted 1 year ago #

    hi @atonu, what do you want to achieve?

  3. atonu
    Member
    Posted 1 year ago #

    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');
  4. konradS
    Member
    Posted 1 year ago #

    @ 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

  5. konradS
    Member
    Posted 1 year ago #

    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

  6. atonu
    Member
    Posted 1 year ago #

    hey konrad,
    nothing seems to work, thanks for your help.
    if you find something that you think may work please let me know.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic