develop a dynamic visualization tool using javascript to track steps during page transitions

I have successfully created a unique step progress bar using CSS, and my next objective is to implement page transitions using Javascript. My plan involves utilizing iframes to contain the pages, but I am currently stuck on how to control the transition using Javascript. Below is the HTML/CSS code snippet for reference.

body {

  color: #01ab97;
}

.progress {
  margin: 100px auto;
  
}


ul {
  text-align: center;
}

ul li {
  display: inline-block;
  width: 100px;
  position: relative;
}

ul li .fa {
  background-color: #ccc;
  width: 18px;
  height: 18px;
  color: #fff;
  border-radius: 50%;
  padding: 5px;
}

ul li .fa::after {
  content: '';
  background-color: #ccc;
  height: 5px;
  width: 105px;
  display: block;
  position: absolute;
  left: 0;
  top: 63px;
  z-index: -1;
}

ul li:nth-child(3) .fa {
  background-color: #148e14;
}

ul li:nth-child(3) .fa::after {
  background-color: #148e14;
}

ul li:nth-child(1) .fa,
ul li:nth-child(2) .fa {
  background-color: #60aa97;
}

ul li:nth-child(1) .fa::after,
ul li:nth-child(2) .fa::after {
  background-color: #60aa97;
}

ul li:first-child .fa::after {
  width: 55px;
  left: 50px;
}

ul li:last-child .fa::after {
  width: 55px;
}
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>STEPS PROGRESS BAR</title>
    <link rel="shortcut icon" href="">
    <link rel="stylesheet" type="text/css" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
    <div class="progress">
        <ul>

            <!-- Add your list items here -->

        </ul>
    </div>
</body>
</html>

If you have any innovative ideas or suggestions, please share them with me. Thank you!

Answer №1

Utilizing an asynchronous approach is beneficial when retrieving data from a server and employing JavaScript to insert the data into a div. If your webpage consists primarily of text, simulating a progress bar could be achieved. However, if there are additional assets present, consider utilizing the following method:

For instance, one strategy involves scanning your page for assets initially, using them for the progress bar (with preload-it), then placing them in the designated container upon completion, which can be followed by executing transitions. Thus, completing the task at hand effectively.

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

Discover choices based on the values in an array

I'm having trouble finding an option in a select menu based on an array value. var array = ["task1", "task2"] var select = document.getElementsByTagName('select'); for (i = 0; i < 2; i++) { $(select).find('option[value=array[i]] ...

linking a div within a navigation bar

I have implemented a template from bootstrap. Here is the navigation bar where you can find the about section. Inside it, there is a bootstrap button: <button type="button" class="btn btn-light">Light</button> When I click on this button, the ...

Utilizing Variables for Managing Get Requests in Javascript

After successfully controlling a relay using my Raspberry Pi and Node JS with the initial code snippet, I encountered some challenges. The task at hand was to ensure that the relay only turns on if it's off, and vice versa. My attempt to achieve this ...

Register with your Facebook account - Angular 4 Typescript

After extensive searching, I have yet to find a clear answer to my question... This is my first time delving into the world of Social Networks. I am curious to know if there are options for Facebook and Twitter sign-ins using Typescript. It seems that Go ...

The debate between client-side and server-side video encoding

My knowledge on this topic is quite limited and my Google search didn't provide any clear answers. While reading through this article, the author mentions: In most video workflows, there is usually a transcoding server or serverless cloud function ...

After making a function call, there are two pairs of parentheses

While exploring the functionality of filters in AngularJS, I came across the requirement to send two sets of parentheses. $filter('number')(number[, fractionSize]) What does this mean and how can we manage it with JavaScript? ...

Issues have been encountered with activating checkboxes on Internet Explorer while utilizing ASP.NET CheckBox controls

I'm facing an issue with an HTML form that includes two disabled checkboxes and an image with an onclick event intended to display a popup and enable the checkboxes: <input id="chk1" type="checkbox" disabled="disabled" /> <input id="chk2" ty ...

Display a fancy slideshow that transitions to five new images when the last one is reached

Here is a screenshot of my issue: https://i.stack.imgur.com/duhzn.png Incorporating Bootstrap 3 and FancyBox, I am facing an issue with displaying images in rows. When I reach the last image, clicking on the right arrow should result in sliding to anothe ...

How can I place a div dynamically under another element?

I am attempting to utilize jQuery in order to detect the position of a div with the class name of .field_slide-produit. My goal is to use this position information to place another div (.slider-content) directly below it on the bottom left, and I also need ...

Angular8: Adjusting Activity Status After Leaving Page

When performing activities like upload, download, delete, and edit, I display statuses such as 'upload started' or 'upload completed'. This works perfectly when staying on the same page. However, there are instances where a user may nav ...

pick out particular values from an array

I have a question that may seem basic to some, but I'm curious about how to select specific elements from an array. In this case, I have an array with 100 elements: var cubes = [element1, element2, element3 ...] and I want to select elements 25-35. ...

At what point in time does the LoadingFrameComplete event in Awesomium typically happen?

According to the documentation from Awesomium, the event WebView.LoadingFrameComplete is triggered when a frame finishes loading. This description seems somewhat ambiguous. Does this event coincide with the JavaScript load event of the window? Or perhap ...

Mastering the DELETE Method with ID in Node.js and ReactJS

Today, I encountered a challenging problem that I would like to discuss. This particular issue seems more complex than usual, so let me elaborate. Initially, I begin by fetching data asynchronously: getRandom = async () => { const res = await axios.g ...

Uncharted Territory: Exploring asynchronous loops with async await and Promise.race?

Currently, I am involved in a project that requires brute forcing a PDF password. To achieve this task, I am using PDF.js to verify the password and implementing promise.race to execute parallel functions for efficient performance. This is how I have str ...

Dealing with problems in col-md display on tablet devices

When viewing on Full Screen and mobile, the ranges panel (class="col-md-3") displays correctly. However, on tablet screens, the left column is obscured by the youtube image panel (class="col-12 col-md-9"). I have attempted various adjustments to the div s ...

Tips for transforming a few Nuxt snippets into Vue components

What is the best approach to transform this Nuxt script into a Vue-compatible one? <script> export default { components: { FeaturedProduct }, async asyncData({ axios }) { try { let response = await axios.get( 'http:// ...

What is the best way to display a success notification when a transaction is successfully executed in web SQL

var brand = "Glare"; var price = "3000$"; var color = "blue"; var success = tx.executeSql("INSERT INTO truck (brand, price, color) VALUES ('"+brand+"','"+price+"','"+color+"' ")"); if(success) { alert("successfully insert ...

Vue.js in conjunction with webpack fails to provide compressed GZIP .js files

I am facing an issue with serving GZIPd JavaScript files from my server to the client. My Simple Vue.js application is hosted on Heroku. After building the site using "npm run build" in the console, I noticed that the /dist/js directory contains 4 differe ...

Tips for retrieving the identifier of a row in a mui datagrid when an onClick event occurs

I'm attempting to integrate a material-ui datagrid with a sql database for the purpose of enabling edits to be made via a form rather than editing individual rows and cells one by one. My goal is to pass the row's id as a parameter to a function ...

Issue: Unable to locate module - Unable to resolve 'core-js/modules/es.error.cause.js'

I've incorporated Vuexy Dashboard into my project, which utilizes Vue 2. Now, I'm in the process of upgrading it to Vue 3. However, I have encountered an error that has me stuck. Any assistance with this issue would be greatly appreciated. Thank ...