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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T20:25:00+00:00 2026-06-01T20:25:00+00:00

I have built a child theme in wordpress. I’m using jQuery to hide and

  • 0

I have built a child theme in wordpress. I’m using jQuery to hide and reveal sub menus. Everything works great in all the browsers except IE. In IE none of my jQuery works for the sub menus. When I try to debug I get this error.

Line: 3
Error: Syntax error, unrecognized expression: nth-of-type

That error appears in the build-in jQuery library that wordpress uses. I am using nth-of-type selectors in my own Jquery, but even when I remove them the problem still persists. This is the jQuery I am using to control the sub menus

if ($("body").hasClass('taxonomy-colordesign')){
$("#hybrid-categories-5 h4").toggleClass("tabDown");//pulls the background image in the tab
$("#hybrid-categories-5 h4").siblings('.dots').toggleClass('active');//activates the little square next to it
$("#hybrid-categories-5 h4").next("ul.xoxo.categories").toggleClass("openTab");//opens up the ul that contains the list of options
$(".menu-main-menu-container li:nth-of-type(3) a").addClass("current");
} 

else if ($("body").hasClass('taxonomy-colorart')){
$("#hybrid-categories-12 h4").toggleClass("tabDown");
$("#hybrid-categories-12 h4").siblings('.dots').toggleClass('active');
$("#hybrid-categories-12 h4").next("ul.xoxo.categories").toggleClass("openTab");
$(" #hybrid-categories-9, #hybrid-categories-3, #hybrid-categories-5").hide();
$(".menu-main-menu-container li:nth-of-type(2) a").addClass("current");

}

else if ($("body").hasClass('taxonomy-mediadesign')){
$("#hybrid-categories-3 h4").toggleClass("tabDown");
$("#hybrid-categories-3 h4").siblings('.dots').toggleClass('active');
$("#hybrid-categories-3 h4").next("ul.xoxo.categories").toggleClass("openTab");
$(".menu-main-menu-container li:nth-of-type(3) a").addClass("current");

}

If anyone could help me I’d really appreciate it.

  • 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-01T20:25:00+00:00Added an answer on June 1, 2026 at 8:25 pm

    cos the nth-of-type is not a valid jquery selector..

    Eg.

    $(".menu-main-menu-container li:nth-of-type(2) a").addClass("current"); is invalid change it to

     $(".menu-main-menu-container li:eq(2) a").addClass("current");
    

    You can refer http://api.jquery.com/nth-child-selector/ or http://api.jquery.com/eq/ for docs

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

Sidebar

Related Questions

I have built a simple menu in jQuery http://vanquish.websitewelcome.com/~toberua/ Here is a sample of
I have built a site in wordpress and the home page is really screwed
We have J2EE application built using Hibernate and struts. We have RMI registry based
I have a Windows Forms application built using the .NET 3.5 Framework which self
I have built UI, its like a search engine for BioProcess/Disease--> Genes. e.g., User
I have built Web sites with Python/Django and desktop applications with Objective-C/Cocoa so programming
We have built a web application that accepts SOAP messages, does some processing, calls
I have built an app that plays lots of sounds the easy way: AudioServicesPlaySystemSound(someSoundID);
I have built a MVC website on IIS6. I used the built-in ASP.NET Security
I have built a class in PHP and I must declare a class variable

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.