Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8202855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T07:20:20+00:00 2026-06-07T07:20:20+00:00

I have implemented AJAX functionality on my WordPress site and all my menu items

  • 0

I have implemented AJAX functionality on my WordPress site and all my menu items now load the pages in real time using AJAX feature.

How ever i dont want 1 menu item to be loaded like ajax. I can insert an additional class to that item but since it is a WordPress based site, the menu is loaded dynamically.
is there any way to create a class which voids the AJAX functionality for juts 1 Menu item.

My Code is below.

 $('.sf-menu li a').live('click', function() {    
                var toLoad = $(this).attr('href')+' #container';
        $('#container').slideUp('300',loadContent);    
        $('#load').remove();    
        $('#wrapper').append('<span id="load">LOADING...<img src="http://boala.pk/engro/wp-content/uploads/2012/07/ajax-loader.gif"></span>');    
        $('#load').fadeIn('normal');    
        window.location.hash =     $(this).attr('href').substr(0,$(this).attr('href').length-5);    
        function loadContent() {    
            $('#container').load(toLoad,'',showNewContent)    
        }    
        function showNewContent() {    
            $('#container').slideDown('400',hideLoader);    
        }    
        function hideLoader() {    
            $('#load').fadeOut('normal');    
        }    
        return false;    
    }); `
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T07:20:22+00:00Added an answer on June 7, 2026 at 7:20 am

    Why can’t you add an additional class to that specific menu item? In WordPress menus if you click on the Screen Options tab at the top you can enable CSS Classes and apply a class to the item you want to load normally.

    You would apply a class to that specific menu item and then use the not() method in jquery to exclude the live() method being applied to that particular class.

    jQuery exclude elements with certain class in selector

    How do set up jquery to exclude classes in a function?

    EDIT

    Your code would be;

     $('.sf-menu li:not(.your-exclude-class) a').live('click', function() {  
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have implemented the auto complete functionality using the Ajax.autocompleter function of the Scriptaculous
I have already implemented some AJAX pagination in my Rails app by using the
I am working on a web site with login registration functionality.I have implemented the
In my site, I have implemented the following functionality: If the user clicks on
I have implemented a dynamic creation of a HTML table using AJAX. Here's what
I have a project where in i have implemented the AutoSearch functionality using asp.net
I am using Ext Js with Rails. I have implemented CRUD functionality, wherein I
I have a functionality of posting messages to a group which works using AJAX
I have implemented an IHttpAsyncHandler. I am making about 5 different AJAX calls from
I have implemented a DAL using Rob Conery's spin on the repository pattern (from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.