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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T06:42:01+00:00 2026-06-03T06:42:01+00:00

I am working on a basic slideshow, it works fine in Firefox however IE

  • 0

I am working on a basic slideshow, it works fine in Firefox however IE is giving me the following errors:

  Expected identifier, string or number  script.js, line 26 character 4
  Expected identifier, string or number  script.js, line 26 character 4
  Expected identifier, string or number  script.js, line 24 character 4
  Expected identifier, string or number  script.js, line 25 character 4
  Expected identifier, string or number  script.js, line 25 character 4
  Expected identifier, string or number  script.js, line 25 character 4
  Expected identifier, string or number  script.js, line 35 character 3
  Expected identifier, string or number  script.js, line 35 character 3
  Expected identifier, string or number  script.js, line 35 character 3
  Expected identifier, string or number  script.js, line 35 character 3
  Expected identifier, string or number  script.js, line 35 character 3
  Expected identifier, string or number  script.js, line 35 character 3
  Expected identifier, string or number  script.js, line 35 character 3

Here is my code (with line numbers attached).

1    $(document).ready(function(){
2                                                   
3       var slideshow = $("#slideshow");
4       var slides = slideshow.children(".slide");
5       var dimensions = {
6           position: slideshow.position(),
7           width: slideshow.width(),
8           height: slideshow.height(),
9           midX: slideshow.width()/2,
10          midY: slideshow.height()/2
11      };
12      var index = 0;
13      
14      slides.each(function(number){   
15          $(this).data("offset", {
16              left: dimensions.midX - ($(this).width()/2),
17              top: dimensions.midY - ($(this).height()/2)
18          });
19          $(this).css({
20              position: "absolute",
21              top: $(this).data("offset").top
22          });
23          if(number == 0) 
24          {
25              $(this).css({left: $(this).data("offset").left + "px"});
26          } 
27          else
28          {
29              $(this).css({left: dimensions.width + "px"});
30          }
31          
32          slideshow.css({
33              position: "relative",
34              overflow: "hidden",
35          });
36      });
37      
38      slideshow.bind('click', slideImages);
39      
40      function slideImages(e){
41          e.preventDefault();
42          $(this).unbind('click', slideImages);
43          var direction = (e.pageX - dimensions.position.left < slideshow.width() / 2) ? "left" : "right";
44          var leftOffset = (direction == "left") ? dimensions.width : -dimensions.width;
45          slides.eq(index).animate({left: leftOffset}, 500, function() {
46              $(this).css({left: -leftOffset});
47          });
48          
49          if (direction == "left")
50              index = (index == (0)) ? slides.length - 1 : index - 1;
51          else
52              index = (index == (slides.length - 1)) ? 0 : index + 1;
53          
54          slides.eq(index).css({left: -leftOffset}).animate({left: slides.eq(index).data("offset").left}, 500, function() {
55              slideshow.bind('click', slideImages);
56          });
57    
58      }
59      
60    });

Does anyone know what’s causing this?

  • 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-03T06:42:03+00:00Added an answer on June 3, 2026 at 6:42 am

    The evil comma of doom has got you.

    IE doesn’t forgive trailing commas in object literals.

    slideshow.css({
        position: "relative",
        overflow: "hidden",   // <-- evil
    });
    

    remove all trailing commas like the above and you’re fine.

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

Sidebar

Related Questions

I have been working with basic SQL for a couple years already. However, only
I am working an a basic learning script below. My main question is in
I have a service, as follows: The most basic (working) CherryPy 3.1 Windows service
Basic summary: Working on a game that generates a 15x15 grid for the player
I'm working on a basic google applications based system. Like I earlier defined I'm
I'm working on a basic garden logging application which consists of gardens, plants and
I'm working on a basic DBMS as a pet project and planning to prototype
I'm working with a basic Java app on Heroku utilizing scribe for OAuth access
I'm working on a basic search for my blog, and the basic functionality is
I have a basic server working but I want to be able to press

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.