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 9192537
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T20:56:54+00:00 2026-06-17T20:56:54+00:00

Working on a wordpress site and adding a sliding marker when hovering over a

  • 0

Working on a wordpress site and adding a sliding marker when hovering over a nav menu bar.

The website – http://avuedesigns.com/iaq

In the chrome Developer tools, it is showing this error:

Uncaught TypeError: Cannot read property 'left' of undefined script.js:242
(anonymous function) script.js:242
v.event.special.(anonymous function).handle jquery.js:2
v.event.dispatch jquery.js:2
o.handle.u

The only page the menu works on is the cart page, and my account’s. I am assuming it might have to be a conflict with library’s, because of a similar situation I had a few days ago. But I do not know the proper way of solving this issue and wish to find guidance so I do not waste anyone’s time with simple questions.

I do know that the marker is off on the working page, had no time to adjust it, wanted to get it working first =P.

Thanks for your time and wisdom.

  • 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-17T20:56:55+00:00Added an answer on June 17, 2026 at 8:56 pm

    It seems like you’re using the wrong class to get the position value for #slidingArrow in script.js @ Line 231:

    activeItem = menuList.find('.current_page_item, .current_page_ancestor, .current_page_parent');
    

    I think you would be better suited to switch out .current_page_item for .current-menu-item. The .current_page_item class did not appear to be populating on all the pages so the #slidingArrow div element was unable to get any positioning information.

    In script.js here are the changes I made to menuSlidingArrow():

    function menuSlidingArrow() {
    
        if(!($j('html').hasClass('oldie'))) {
    
            var mainmenu    = $j('.menu-content'),
                arrow       = $j('#slidingArrow'),
                menuList    = mainmenu.find('ul.menu'),
                activeItem  = menuList.find('.current-menu-item, .current_page_ancestor, .current_page_parent'); //remove .current_page_item
    
            $j(window).load(function() {
                arrow.css({ 'left':(activeItem.position().left + ((activeItem.outerWidth() - 48)/2) ) -6});
                arrow.fadeIn('slow');
            });
    
            menuList.children().hover(function(){
                arrow.animate({ 'left':($j(this).position().left + (($j(this).outerWidth() - 48)/2) ) -6},
                    { queue: false, easing: 'easeOutQuad', duration: 250 });
            },function(){
                arrow.animate({ 'left':(activeItem.position().left + ((activeItem.outerWidth() - 48)/2) ) -6},
                    { queue: false, easing: 'easeOutQuad', duration: 250 });
            });
        }
    
    }
    

    I also needed the following CSS to get it to work:

    #menu-main-menu {
        margin-left:68px;
    }
    #menu-item-8197 a { /* hide home navigation item */
        color:#fff;
    }
    #slidingArrow {
        margin-left:77px;
    }
    

    Lastly, be sure you add the ‘Home’ page to the top navigation. You’re going to want to add it as the first item on the navigation.

    All in all I changed/added:

    • .current_page_item changed to .current-menu-item
    • Added #slidingArrow { margin-left: 77px; }, menu-item-8197 a { color:#fff; }, #menu-main-menu { margin-left:68px; }
    • Modified calculations to center #slidingArrow under the navigation item
    • Added home to the navigation
    • Hide home navigation element on navigation

    Let me know how this works for you and if you run into any errors I’d be happy to get my answer corrected for you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a wordpress site, with a blog post that ends like: http://www.blog.com/?p=2
I've been working on integrating deeplinking into a wordpress site im developing; http://dhp.camoconnell.com/ the
I'm working on a wordpress site, customizing the menu. I'm no php whiz, and
I'm working on a WordPress site that uses a dynamically generated menu system which
I am working on a WordPress site and I have placed the following code
I am working on a WordPress site where one of the pages lists excerpts
i'm working on a wordpress site using buddypress. So, i'm making a page where
I am working on a site with WordPress for a client who wants to
I'm working on a WordPress that will allow the site administrator to switch between
I am working on a migration work to WordPress for a site where all

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.