Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

JavaScript JavaScript screen transition?

Codington387

New Coder
I’m not asking for step by step instructions here, just a link to something like a tutorial would be good

I’m not sure if this is the right word for it

I’m working on a project on Codepen using html / CSS / JavaScript and I want to make it so that when you click on something, it transitions to a whole new screen

How would I accomplish this? I am assuming I would need html and CSS for this as well but I’m only concerned with the JavaScript component for now

For example, you click on a word and it goes from this:


To this:

 
The transition is done with CSS. The JS controls when it happens.
JS stuff:
The HTML has three (3) divs. the second and third are hidden by class = hide
When you click START it goes to startQuiz() which hides the start div and shows the second. Then it displays the array question in that div.
The side in is controled here
Code:
.container .question-box {
    display: flex;
    align-self: flex-start;
    padding: 15px 0;
    padding-bottom: 0;
    transition: transform 0.2s ease;
}

The entire js is to control the second box and then grade the test. The only problem with the code = No STOP to it.

I know this is not the entire explanation. I just hope it's enough to get you started in doing what you want to do.

<scr
 
The transition is done with CSS. The JS controls when it happens.
JS stuff:
The HTML has three (3) divs. the second and third are hidden by class = hide
When you click START it goes to startQuiz() which hides the start div and shows the second. Then it displays the array question in that div.
The side in is controled here
Code:
.container .question-box {
    display: flex;
    align-self: flex-start;
    padding: 15px 0;
    padding-bottom: 0;
    transition: transform 0.2s ease;
}

The entire js is to control the second box and then grade the test. The only problem with the code = No STOP to it.

I know this is not the entire explanation. I just hope it's enough to get you started in doing what you want to do.

<scr
Thank you very much!
This is a huge help :)
 

New Threads

Latest posts

Buy us a coffee!

Back
Top Bottom