The "Splash Screen Div" page displayed during transitions and page loading

Creating a "Splash Screen Div" for a loading page involves waiting until everything is loaded and then hiding or moving the div off screen. Below is an example:

index.html

<div id="loading-Div">

        <div id="bear-Logo">

            <div id="target">
                <div id="target2">
                    <div id="bearloop"></div>
                </div>
            </div>

        </div>

    </div>

loading.css

Use a class called 'fallback' to move the absolutely positioned div offscreen.

loading.js

$(window).load(function(){

    $( '#loading-Div' ).addClass( 'fallback' );

});

This method works well when clicking a link and displaying the div while the page loads. However, there's a desire to show the div immediately upon clicking the link and keep it visible until the destination page is fully loaded.

Workflow:


Key Points:

Implementing this feature may require a browser plugin because:

  1. The link doesn't lead to another anchor within the same page.
  2. Since the link directs to a different .html page, the content being displayed would halt during the transition.

Note:

  1. This functionality is limited to intra-site usage only.
  2. No concern for compatibility with IE.
  3. This is not associated with any academic assignment or client project. It's solely for learning web development and experimenting with creative page transitions.

Exploring options without using animations and callbacks for outgoing links to display the div smoothly can be challenging. Balancing coherence with file size becomes an important consideration. Any suggestions on how to tackle this issue are welcome!

Answer №1

By placing your Javascript at the bottom of the page, it will load asynchronously after everything else has loaded.

index.html

I'm curious about the nested DIV structure you used. Will the content load inside the logo element?

loading.css

Is moving the div off-screen part of your animation strategy?

$(".fallback").animate({top: "+=400px", opacity: 0}, 1000);

loading.js

If you intend to display an element after a link is clicked, you don't necessarily need to use the window.load function.

http://jsfiddle.net/Etd2D/

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Socket IO: Error - The call stack has exceeded the maximum size limit

Whenever a client connects to my node.js server, it crashes with a 'RangeError: Maximum call stack size exceeded' error. I suspect there's a recursive problem somewhere in my code that I can't seem to find. This is the code on my serve ...

Implementing global parameters in ui-router

Currently, I am utilizing ui-router in AngularJS as shown below: .state ('browse.category', { url: "/:category", templateUrl: "views/browseCategory.html", controller: function($stateParams, $scope) { $scope.params = $st ...

Transfer the imageURI to a different HTML page

My mobile app, created using PhoneGap, allows users to select an image from their album. I want to pass that selected image and display it on another HTML page. Does anyone have any suggestions on how to achieve this? Below is the code snippet: selectImag ...

Facing continuous 404 errors while working with nodejs and express

While attempting to collect data from a local host webpage's registration form that captures user information, I encounter an issue upon pressing the submit button A 404 Error is displayed stating "page not found", preventing the collection and out ...

I want to hide jqvmap when viewing on mobile devices

I'm currently working on my website at . I have a template that I'm using as a guide, but I want to make the map disappear on mobile view and replace it with a dropdown list. Can anyone suggest what code I should use for this? Appreciate any hel ...

How to Display Element in Vue.js when Window.print is Triggered?

I'm wondering if it's possible to show a different message when a user tries to print my page. I currently have a 'Pay Now' button that isn't visible in the print preview. I'd like to display a text saying 'Visit www.exam ...

problems encountered when trying to deploy a backend api on the Render platform

Encountered this error: May 14, 04:27:30 PM - Error [email protected]: The "node" engine is not compatible with this module. Expected version ">=14.20.1". Received version "14.17.0". May 14, 04:27:30 PM - Incompatible module detected. Verified my nod ...

What is the method to include a CoffeeScript file in my project?

Currently, I am attempting to follow the steps outlined in this CoffeScript tutorial. After opening the terminal and navigating to the directory where simpleMath.coffee is located, I proceeded to run node and entered var SimpleMath = require('./simpl ...

Unable to perform a default import in Angular 9 version

I made adjustments to tsconfig.json by adding the following properties: "esModuleInterop": true, "allowSyntheticDefaultImports": true, This was done in order to successfully import an npm package using import * as ms from "ms"; Despite these changes, I ...

Simple steps to load various json files into separate json objects using node.js

I am new to working with Json and node.js My goal is to load a json file into a JsonObject using node.js, but I have been struggling to accomplish this task. I have created two files, one named server.js and the other jsonresponse.json. My objective is t ...

Issue with getStaticProps not updating fetched values in Next.js production environment

I am currently working on building a blog using Next.js. Since the back-end is taken care of by another team, I am utilizing fetch API calls in getStaticProps to retrieve my articles, even though it may be considered best practice to interact with the data ...

Monitoring user logins based on user identification

How can I effectively monitor the activity of users who have logged into a web application that is managed by an external company? Despite my extensive research efforts, as a non-technical individual, I am struggling to understand how to utilize Google Ana ...

Having trouble selecting links in the navigation bar

Just getting started with HTML/CSS and designing a website with buttons. Got some buttons up and running perfectly fine. But now, I'm working on a navigation bar with anchors inside. The problem is that while I can see the anchors when I open the webs ...

An error occurred as the Serverless Function timed out while attempting to load a dynamic route in Next.js version 13

I have a basic Next.js application with the following route structure: /contentA/ - Static - Initial load: 103 kB /contentA/[paramA]/groups - SSG - Initial load: 120 kB /contentB/[paramA]/[paramB]/[paramC] - SSR (client component) - Initial load: 103 kB ...

What is the best way to filter specific data types when using ngFor in Angular?

As I loop through the array named "fruits," which contains objects of type "FruitService" that I created, I want to display each element. However, when I delete them (I know it's strange, no database involved), they turn into type "undefined" and star ...

Troubleshooting a Node.js problem with variable scope

I'm working on a nodejs route that downloads a URL as an mp3 using npm-youtube-dl. I have a download directory being monitored with chokidar for new files, and once a file is added, I save the file link. After the download completes, a function is cal ...

Updating a slider based on the values of two other sliders can be achieved by implementing a

I am working on a project that involves three input sliders. I need the third slider to display the product of the values from the first two sliders. Additionally, I want the value of the third slider to update dynamically whenever the values of the first ...

The project is not being recognized by 'webpack' when running within it

Every time I attempt to execute 'webpack' in my project, the command line shows me this error message: 'webpack' is not recognized as an internal or external command, operable program or batch file. I have installed webpack using th ...

Update to react version 18.2.0, router-dom v6, and mui 5 for improved performance

Struggling to convert the following file or code into React's latest version and react-router-dom v6. I attempted it myself but encountered errors related to createBrowserHistory that I couldn't comprehend. My routes are stored in a JSON file and ...

Resetting form fields when clicking the "Next" button with the FormToWizard jQuery Plugin

I am in the process of developing a lengthy form using the jQuery plugin called formToWizard. Within one of the fieldsets located midway through the form, there are hidden fields that are displayed upon clicking a button. The strange issue I am encounterin ...