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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T01:32:01+00:00 2026-05-19T01:32:01+00:00

I’m trying to solve an IE CSS issue by using conditional tags. My jQuery

  • 0

I’m trying to solve an IE CSS issue by using conditional tags. My jQuery that does the job of tabbed box effect calls an id that is inside the conditional tags. I’ve given new ids to IE so on IE the jQuery is not working. I tried to duplicate the script with the new id in one of the script but the 2 scripts seems to get in conflict.

My jQuery (in between the head tags) is (for all all browsers except IE):

  <script>
var currentTab = 0; // Set to a different number to start on a different tab.

function openTab(clickedTab) {
 var thisTab = $(".tabbed-box .tabs a").index(clickedTab);
 $(".tabbed-box .tabs li a").removeClass("active");
 $(".tabbed-box .tabs li a:eq("+thisTab+")").addClass("active");
 $(".tabbed-box .tabbed-content").hide();
 $(".tabbed-box .tabbed-content:eq("+thisTab+")").show();
 currentTab = thisTab;
}

$(document).ready(function() {
 $(".tabs li:eq(0) a").css("border-left", "none");

 $(".tabbed-box .tabs li a").click(function() { 
  openTab($(this)); return false; 
 });

 $(".tabbed-box .tabs li a:eq("+currentTab+")").click()
});
</script>

And I would need this for IE:

    <script>
var currentTab = 0; // Set to a different number to start on a different tab.

function openTab(clickedTab) {
 var thisTab = $(".tabbed-box .tabs a").index(clickedTab);
 $(".tabbed-box ie-.tabs li a").removeClass("active");
 $(".tabbed-box ie-.tabs li a:eq("+thisTab+")").addClass("active");
 $(".tabbed-box .tabbed-content").hide();
 $(".tabbed-box .tabbed-content:eq("+thisTab+")").show();
 currentTab = thisTab;
}

$(document).ready(function() {
 $(".ie-tabs li:eq(0) a").css("border-left", "none");

 $(".tabbed-box .ie-tabs li a").click(function() { 
  openTab($(this)); return false; 
 });

 $(".tabbed-box .ie-tabs li a:eq("+currentTab+")").click()
});
</script>

Having the 2 scripts in the head conflicts with each other. Maybe there is a way to combine them?

  • 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-05-19T01:32:02+00:00Added an answer on May 19, 2026 at 1:32 am

    IE Conditional comments are your friend

    <!--[if IE]>
    <script>
       // The IE script
    </script>
    <![endif]-->
    
    <![if !IE]>
    <script>
       // The script for other browsers
    </script>
    <![endif]>
    

    IE will only see the first script. All other browers see only the second one.

    If you only wish to have this “special treatment” for a certain old version of IE, but newer ones like IE8 or IE9 behave properly and can use the standard script, then write the condition like this:

    <!--[if IE lte 6]>
       // The script for IE6 and below
    </script>
    <![endif]-->
    

    This way only IE 6 and below will see this script. Newer IE versions will use the standard script.

    This also allows you to cleanly throw away the special script, once support for these versions of IE is no longer required.

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

Sidebar

Related Questions

No related questions found

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.