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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T21:18:02+00:00 2026-05-12T21:18:02+00:00

I would like to learn how to do fade, and similar effects on JavaScript.

  • 0

I would like to learn how to do fade, and similar effects on JavaScript. I often get answers, like why not use jQuery, Mootools, etc ? Well, I want to learn how stuff works, then I won’t mind using any of these frameworks.

I’m currently learning about making changes on the DOM, so, I’ve read a lot of stuff on this theme. Also, I’ve read about Reflow, still, I didn’t find any cool stuff on Repaint, but, I’ll keep searching.

From seeing source files etc, I see a few methods, that I don’t know if they’ve created or are Core methods of JS.

My question is, is there any resource where I can learn all this neat stuff like smooth position change, fading elements trough opacity or whatever, etc?

  • 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-12T21:18:03+00:00Added an answer on May 12, 2026 at 9:18 pm

    here’s an example that works in firefox and chrome. ie doesn’t respect the opacity style.

        var ELEMENT;
        var STEPS;
        var INTERVAL;
        var COUNT;
        var TIMERID;
    
        // 5 * 200ms = 1 second
        STEPS = 5;
        INTERVAL = 200;
    
        function Button1_onclick() {
    
            ELEMENT = document.getElementById("foo");
            COUNT = STEPS - 1;
            TIMERID = setInterval(Fade, INTERVAL);
        }
    
        function Fade() {
    
            ELEMENT.style.opacity = String(COUNT / STEPS);
            COUNT--;
    
            if (COUNT < 0) {
                clearInterval(TIMERID);
                TIMERID = 0;
            }
        }
    

    setInterval and clearInterval are standard js functions. they will execute the given function every x milliseconds. in our case we kill it when we’ve hit 0 opacity.

    sliding a window is a similar process. you’d set the left/right/top/bottom style instead of opacity.

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

Sidebar

Ask A Question

Stats

  • Questions 207k
  • Answers 207k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Here's a link to a Perlmonks page which says "Beware… May 12, 2026 at 9:18 pm
  • Editorial Team
    Editorial Team added an answer To create a node reader: using (XmlReader reader = new… May 12, 2026 at 9:18 pm
  • Editorial Team
    Editorial Team added an answer This should be your #1 resource for general layout questions… May 12, 2026 at 9:18 pm

Related Questions

I would like to learn how to work with the Django Admin. How do
I would like to learn how setup prefix routing like there is in cakephp
I would like to learn how to use binding functions. Here is the idea:
I would like to create an application that runs on XBox 360 (downloaded using
I'm new to C# and I'm starting to learn how to program I'm learning

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.