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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T10:17:53+00:00 2026-06-09T10:17:53+00:00

I write these code and make it work in IE&chrome&firefox,It works well in chrome

  • 0

I write these code and make it work in IE&chrome&firefox,It works well in chrome and firefox but wrong in IE. somebody tells me why,thanks!

these codes makes a animation when I push start button, I hope it stop when I push stop button,but when I push stop, the alert shows so much times.

ok,this is my code. becareful about your browser, maybe it will crash when the animation is playing.

forgive me about my poor english

<html style = "overflow:hidden">
<script src="jquery-1.7.2.js"></script>
<script>
var DIV ;
var CONTENT ;
var move = false;
$(function(){
    DIV = $('<img src="7.png"></img>');
    CONTENT = $('#content');
});
function startAnimation(){
    $('#content').empty();
    var div = $('<img src="7.png"></img>');
    div.appendTo('#content');

    var w_w=$(document).width();
    var d_w=div.width();
    var l=w_w/2 - d_w/2; 

    div.css("position","absolute");
    div.css("top",$(document).height()+div.height());
    div.css("left",l);

    if(!move){
        div.animate({top:-div.height(),left:l},1000,function(){
            alert('ok');
            return;
        });
    }else{
        div.animate({top:-div.height(),left:l},1000,function(){
        //setTimeout(function(){
            startAnimation.call(window);
            return;
        });
    }
}
function start(){
    if(!move){
        move = true;
        startAnimation();
    }
}
function stop(){
    move = false;
}
</script>
<body  style = "overflow:hidden">
<button onclick="start();">start</button>
<button onclick="stop();">stop</button>
<div id='content' sytle="width:1000px;height:700px;overflow:hidden">

</div>
</body>
</html>
  • 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-09T10:17:55+00:00Added an answer on June 9, 2026 at 10:17 am

    Some Internet Explorer versions does ignore css values; without px at the end of it.

    top:200 returns error but top:200px works fine on ie.

    Try this:

    if(!move){
       div.animate({'top':-div.height()+'px','left':l + 'px'},1000,function(){//here
            alert('ok');
            return;
       });
    }else{
       div.animate({'top':-div.height()+'px','left':l + 'px'},1000,function(){//+'px'
            startAnimation.call(window);
            return;
       });
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I write hobby code from time to time. The thing is these tools, classes
i'm using DbSimple, but there is some code which i could write into another
I'm trying to write some code to help unit test WCF services. These services
I wrote these lines in my code: CFUUIDRef identifier = CFUUIDCreate(NULL); NSString *identifierString =
Is there an easy way to write C code that can access its Git
Is there a way to write this C/C++ code in Python? a = (b
Is there a piece of code I could write to be notified when a
There's another way to write this code ? I think it's kinda unprofessional and
Is there a way i can write the following piece of code to be
Is there a better/shorter way to write the whoAmI method in the following code?

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.