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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T20:15:05+00:00 2026-05-17T20:15:05+00:00

Apple changed their home page with a fade in effect that loads fast. Is

  • 0

Apple changed their home page with a fade in effect that loads fast. Is this HTML 5 or jQuery?

Does anyone know how they did this?

  • 1 1 Answer
  • 1 View
  • 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-17T20:15:05+00:00Added an answer on May 17, 2026 at 8:15 pm

    With this bit of javascript –> http://images.apple.com/global/scripts/ac_blackout.js.

    Here it is after a run through http://jsbeautifier.org/:

    AC.Blackout = Class.create({
        defaultOptions: {
            duration: 1.25,
            delay: 2,
            showOnce: false,
            showWhenReferredByApple: true
        },
        initialize: function (c, a, b) {
            this.uniqueIdentifier = a || Math.floor(Math.random() * 1000000);
            this.options = Object.extend(Object.clone(this.defaultOptions), b);
            if (!this.shouldShow()) {
                return false
            }
            this._addBodyClass();
            Event.onDOMReady(function () {
                this.og = {};
                this.og.element = $(c);
                this.bo = {};
                this.bo.offsets = this.og.element ? this.og.element.cumulativeOffset() : [0, 0];
                this.images = [];
                if (this.options.showOnce) {
                    this._setHasShown()
                }
                this._create();
                this.fade.bind(this).delay(this.options.delay)
            }.bind(this))
        },
        addImage: function (b, a) {
            this.preloadImage(b);
            if ( !! this._acceptImages) {
                this._addImage(false, b, a)
            } else {
                this._boundAddImage = this._addImage.bindAsEventListener(this, b, a);
                Event.observe(document.body, "ACBlackout:acceptImages", this._boundAddImage)
            }
        },
        preloadImage: function (c) {
            var b = function (d) {
                delete a
            };
            var a = new Image();
            a.onload = b;
            a.src = c
        },
        _addImage: function (a, c, b) {
            if (typeof this.images == "undefined") {
                return false
            }
            this.images.push(new AC.Blackout.Image(this.bo, c, b))
        },
        wasReferredByApple: function () {
            if (typeof this._wasReferredByApple !== "undefined") {
                return this._wasReferredByApple
            }
            this._wasReferredByApple = document.referrer.match(/^\w*:\/\/[^\.]*.apple.com/);
            if ( !! document.referrer.match(/\/home/)) {
                return false
            }
            return this._wasReferredByApple
        },
        shouldShow: function () {
            if (typeof this._shouldShow !== "undefined") {
                return this._shouldShow
            }
            if (/msie|MSIE 6/.test(navigator.userAgent)) {
                return this._shouldShow = false
            }
            this._shouldShow = true;
            if (this.options.showOnce) {
                if (!this.options.showWhenReferredByApple) {
                    if (!this.wasReferredByApple()) {
                        return this._shouldShow = true
                    }
                }
                try {
                    typeof localStorage
                } catch (b) {
                    return this._shouldShow = false
                }
                if (typeof localStorage !== "undefined") {
                    try {
                        var a = localStorage.getItem("ACBlackout-" + this.uniqueIdentifier);
                        this._shouldShow = (a == null) ? true : false
                    } catch (b) {
                        return this._shouldShow = false
                    }
                } else {
                    if ("addBehavior" in document.body) {
                        document.body.addBehavior("#default#userData");
                        document.body.load("ACBlackout");
                        this._shouldShow = document.body.getAttribute("ACBlackout-" + this.uniqueIdentifier) == null ? true : false
                    }
                }
            } else {
                if (!this.options.showWhenReferredByApple) {
                    if ( !! this.wasReferredByApple()) {
                        this._shouldShow = false
                    }
                }
            }
            return this._shouldShow
        },
        _addBodyClass: function () {
            document.body.className += " ACBlackoutBody"
        },
        _setHasShown: function () {
            var a = new Date;
            a = a.getTime();
            try {
                typeof localStorage
            } catch (b) {
                return true
            }
            if (typeof localStorage !== "undefined") {
                try {
                    localStorage.setItem("ACBlackout-" + this.uniqueIdentifier, a)
                } catch (b) {
                    return true
                }
            } else {
                if ("addBehavior" in document.body) {
                    document.body.addBehavior("#default#userData");
                    document.body.setAttribute("ACBlackout-" + this.uniqueIdentifier, a);
                    document.body.save("ACBlackout");
                    return true
                } else {
                    return true
                }
            }
        },
        _create: function () {
            this.bo.height = document.documentElement.clientHeight > document.body.scrollHeight ? document.documentElement.clientHeight : document.body.scrollHeight;
            if ($("ACBlackout")) {
                this.bo.element = $("ACBlackout")
            } else {
                this.bo.element = new Element("div", {
                    id: "ACBlackout",
                    "class": "ACBlackout",
                    style: "height: " + this.bo.height + "px;"
                })
            }
            this._acceptImages = true;
            Event.fire(document.body, "ACBlackout:acceptImages", true);
            if (AC.Detector.isCSSAvailable("transition")) {
                this.bo.element.setVendorPrefixStyle("transition", this.options.duration + "s opacity ease-in")
            }
            if (AC.Detector.isIE()) {
                Element.insert(document.body, {
                    bottom: this.bo.element
                })
            } else {
                Element.insert(document.body, {
                    top: this.bo.element
                })
            }
            Element.removeClassName(document.body, "ACBlackoutBody")
        },
        fade: function () {
            if (AC.Detector.isCSSAvailable("transition")) {
                var b = function (c) {
                    c.target.hide();
                    c.target.removeVendorEventListener("transitionEnd", a)
                };
                var a = b.bindAsEventListener(this);
                this.bo.element.addVendorEventListener("transitionEnd", a);
                this.bo.element.setStyle("opacity: 0;")
            } else {
                this.bo.element.fade({
                    duration: this.options.duration
                })
            }
        }
    });
    AC.Blackout.Image = Class.create({
        defaultOptions: {
            offsets: [0, 0],
            dimensions: false,
            duration: 0.75,
            delay: 0
        },
        initialize: function (b, c, a) {
            this.options = Object.extend(Object.clone(this.defaultOptions), a);
            this.bo = b;
            this.src = c;
            this._create();
            this.fadeIn.bind(this).delay(this.options.delay)
        },
        _create: function () {
            this.left = this.options.offsets[0];
            this.top = this.bo.offsets[1] + this.options.offsets[1];
            this.main = new Element("div", {
                "class": "ACBlackoutMain"
            });
            this.img = new Element("img", {
                src: this.src,
                "class": "ACBlackoutImg",
                style: "top: " + this.top + "px; left: " + this.left + "px;"
            });
            if (this.options.dimensions) {
                this.img.setStyle("width: " + this.options.dimensions[0] + "px; height: " + this.options.dimensions[1] + "px;")
            }
            if (AC.Detector.isCSSAvailable("transition")) {
                this.img.setStyle("opacity: 0");
                this.img.setVendorPrefixStyle("transition", this.options.duration + "s opacity ease-in")
            } else {
                this.img.hide()
            }
            this.bo.element.insert(this.main);
            this.main.insert(this.img)
        },
        fadeIn: function () {
            if (AC.Detector.isCSSAvailable("transition")) {
                this.img.setStyle("opacity: 1;")
            } else {
                this.img.appear({
                    duration: this.options.duration
                })
            }
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Now that Apple has changed their in-app subscription model, there is a feature that
Apple is always in the news these days with i this and i that.
So I just changed the PageControl project from Apple's site here . The issue
Before iOS4.0 clicking the home button on iPhone exits the application, and Apple had
Say I have info.php page with user info (id, name, age, etc). On this
Update (21st Sept 2016) - Thanks to Digbyswift for commenting that this solution still
Trying to have a user input their name, copy that variable to a file,
Let's say that I have a multiple select field like this: <select id=foodlist multiple=multiple>
I'm following Apple's documentation about Relationships . In their example, a Department has a
I'm writing an app that will allow iPhone users to login to their accounts.

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.