0

I have no clue how to do this

I have no experience with jQuery but have only found ways to do something similar to this using it, but I need help with centering the button, and making it replace the first h2 and p but having it keep the padding and border along with color, alignment etc. I also don't know if anyone will know how to do this so here's a challenge, idc what language it's in. https://code.sololearn.com/WVwp0Xysq1V7/?ref=app

2nd Mar 2019, 10:25 PM
Pierson
Pierson - avatar
3 Réponses
+ 1
I realize I never updated the code since I figured it out so here https://code.sololearn.com/WVwp0Xysq1V7/?ref=app
4th Mar 2019, 2:07 PM
Pierson
Pierson - avatar
+ 1
//You can use simple html tag <center> to centre button <center> <button>Replace the first p element with new text</button> </center> //Here is a solved on including jquer problem https://code.sololearn.com/W7hGLZ53Gixm/?ref=app
2nd Mar 2019, 10:28 PM
Sudarshan Rai
Sudarshan Rai - avatar
0
ok added that https://code.sololearn.com/WVwp0Xysq1V7/?ref=app I actually figured it out by just using java like this <!DOCTYPE html> <html> <style> h2 { color: blue; } </style> <body> <h2 id="demo">Click the button to change the text in this paragraph.</h2> <button onclick="myFunction()">Try it</button> <script> function myFunction() { document.getElementById("demo").innerHTML = "Hello World"; } </script> </body> </html>
2nd Mar 2019, 10:32 PM
Pierson
Pierson - avatar