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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:07:37+00:00 2026-06-02T02:07:37+00:00

I am using a fly across effect on my site. Like this – The

  • 0

I am using a “fly across” effect on my site. Like this – The Horizontal Effect.

The script works a treat in IE8,9, FF and Chrome. When in IE7 I have more than one element on a page. Both have the same id. Hovering over the first item on the page, It loads. Hovering over the other and it doesnt work at all. Doesnt quite make sense to me.

My code is as follows :

HTML

<div style="margin-bottom:30px;" id="takealook-sub">
            <a href="#">
                <img style="left: -200px;" alt="" src="path/to/image">
            </a>
</div>

jQuery

$(function(){
        $("#takealook-sub a").hover(function(){
            $("img", this).stop().animate({left:"0px"},{queue:false,duration:600});
        }, function() {
            $("img", this).stop().animate({left:"-200px"},{queue:false,duration:600});
        });
    });

Does anyone know of a reason why one would work in IE7, But not the other? Like I say all seems fine in all other browsers.

Thanks

  • 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-02T02:07:39+00:00Added an answer on June 2, 2026 at 2:07 am

    You cannot have duplicate ids on a single document …. use a class instead … see the v4.0.1 HTML specs here and v5 HTML specs here

    Example of using a class :

    <div style="margin-bottom:30px;" class="takealook-sub">
        <a href="#">
            <img style="left: -200px;" alt="" src="path/to/image">
        </a>
    </div>
    <div style="margin-bottom:30px;" class="takealook-sub">
        <a href="#">
            <img style="left: -200px;" alt="" src="path/to/image">
        </a>
    </div>
    

    ie you can have as many as you like…. then you can do this :

    $(function () {
        $(".takealook-sub a").hover(function () {
            $("img", this).stop().animate({
                left: "0px"
            }, {
                queue: false,
                duration: 600
            });
        }, function () {
            $("img", this).stop().animate({
                left: "-200px"
            }, {
                queue: false,
                duration: 600
            });
        });
    });
    

    in the jQuery selectors . is the prefix for classes instead of a # for ids

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

Sidebar

Related Questions

How does one create Dynamic CSS and JavaScript On-The-Fly (using PHP). This needs to
So I am using this code to resize an image on the fly and
I'm generating HTML elements on the fly using javascript. These controls are located within
I am trying to remove a part of a document on the fly using
I'm using PHPPdf library to generate PDFs on the fly in my Symfony2 app.
We are creating PDF documents on the fly from the database using PDFsharp .
I want to create sub-domains using PHP on the fly. Suppose a user registers
I'm generating invoice PDFs on the fly, and using my model to calculate the
using (var file_stream = File.Create(users.xml)) { var serializer = new XmlSerializer(typeof(PasswordManager)); serializer.Serialize(file_stream, this); file_stream.Close();
I am using Prawn PDF to create PDF files on the fly in my

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.