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

  • Home
  • SEARCH
  • 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 8510949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:51:02+00:00 2026-06-11T03:51:02+00:00

The following thread provided me with a neat script to swap out div content

  • 0

The following thread provided me with a neat script to swap out div content and was authored by Carl Meyer.

Unfortunately the script does not work in IE7 & IE8 but works in Firefox 4+ and Chrome.

Does anyone know what i need to edit to get the script to work in IE7 & IE8?

Here is the script as i have edited it:

<script type="text/javascript" src="scripts/jquery-1.8.1.js"></script>
<script type="text/javascript">
    $(document).ready(function() {
    switches = $('#switches > div');
    slides = $('#slides > div');
    switches.each(function(idx) {
            $(this).data('slide', slides.eq(idx));
        }).hover(
        function() {
            switches.removeClass('active');
            slides.removeClass('active');             
            $(this).addClass('active');  
            $(this).data('slide').addClass('active');
        });
    });
</script>

<style type="text/css">
    #switches div.active {
      display: block;
    }   
    #slides div {
      display: none;
    }   
    #slides div.active {
      display: block;
    }   
</style>

<div id="switches" class="float_left">                      
 <div>switch 01</div>
 <div>switch 02</div>
 <div>switch 03</div>       
</div>

<div id="slides" class="float_left">
 <div class="active">(01) Slide content goes here</div>
 <div class="">(02) Slide content goes here</div>
 <div class="">(03) Slide content goes here</div>   
</div>
  • 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-11T03:51:04+00:00Added an answer on June 11, 2026 at 3:51 am

    The switches and slides variables are not initialised and thus breaks in Internet Explorer, try adding ‘var’ infront

    i.e.

    var switches = $('#switches > div');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The following class is not thread-safe (as proven in Proving the following code not
I'm following the provided instructions but is not working. I'm getting this error: INFO:
I have the following thread code which executes correct first time. After that from
I have the following thread: class LemonadeMainMenuThread extends Thread { private SurfaceHolder mSurfaceHolder; private
I have the same problem that is listed in the following thread. WSDL first
Following this thread, I tried to upload a file on the server. If I
In a thread, I'm doing the following: builder_thread = Thread.new do FileUtils.cp_r(folder,dest) io_object =
Following leads in this thread and others, I've set up a code block where
The following function System.Threading.Thread.Sleep(); delay the thread in millisecond, and take the integer value
After following the great advice given in a thread about service beans I have

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.