- 1
CSS + JavaScript Transition - help -
I got a simple code here - for experiment. I've tried looking up transition CSS and JavaScript, but I never got the result I wanted. So, on this code what I'm trying to do is to make the 'JavaScript learning' content width to 10. And that's all done with CSS + JavaScript for applying Onclick. https://code.sololearn.com/WXBPQb7gjqdH/?ref=app Function YourBrain(){ If (question make no sense) { please let me know}; else { you = understood question}}
11 Respuestas
+ 1
Airree. Thank you for that. learned something new - Target, and using # to link (content).✔️👍
+ 2
Since you have used the ID tag. It is for us to simplify this point of the code.
Example:
document.getElementById ("content") == content;
+ 2
I changed the code.
+ 2
<div ID="elem"></div>
To select the element simply write the name of its identifier, "elem";
Your "content"!
+ 1
Made with pure JS, added comments
https://code.sololearn.com/W8ul0BdszL9a/?ref=app
+ 1
Simple.
Create a transition in CSS, set its change attribute and duration time.
Perform the modification with JS.
Customize in your favor.
https://code.sololearn.com/Wuf9kiK12jNE/#css
+ 1
Airree , I am trying to keep it simple (if it is possible). I wanted to add CSS transition, then onclick ...getElementById("").style.transition=""
Thank you though. Since I'm just a beginner, Im don't really understand JS.
I can do ...function ...document.getElementById("").style.____="__".
I and that's about it.
+ 1
0
what you mean by ... Since you have used the ID tag. It is......code.
Example:document.get...==content;
?
0
Airree that's without JS?
It doesn't have to be with JS, but i was wondering how it was working.