+ 3

How do you program pop ups with JavaScript only. (The cool ones that are on the page)

Hey can someone help me with how to program popups with JS only. On the website body. Thank you. Note a fancy popup not the alert(“some text”) https://code.sololearn.com/W8rt58hF58I6/?ref=app also can you check this out thx

2nd Dec 2018, 8:15 PM
Surgarypeaches68
Surgarypeaches68 - avatar
9 odpowiedzi
+ 3
An example would be great. Why the emphasis on JS only though? Could you possibly be talking about a modal? I'll post my code here as an example. Clicking (or tapping) on the detail buttons and clicking the search icon will trigger modals, which are basically types of pop-ups in a way. https://code.sololearn.com/Wh117ebi576o/?ref=app
3rd Dec 2018, 12:41 AM
Zeke Williams
Zeke Williams - avatar
+ 3
I believe you are asking about making your own pop-up, as opposed to the built in alert pop-up. In this case, you'll probably want to think about how you want to trigger it, if you want to create the html using js or just change the hidden property with js. So what do you mean by JS only? Create, append, and stylize all in JS?
3rd Dec 2018, 12:19 AM
Zeke Williams
Zeke Williams - avatar
+ 2
alert(“Hi”) makes a popup that says hi.
2nd Dec 2018, 9:06 PM
Kyle
Kyle - avatar
+ 2
low like one of those cool popups that have background colers
3rd Dec 2018, 12:24 AM
Surgarypeaches68
Surgarypeaches68 - avatar
+ 1
oh ya maybe he wants to design a popup, that was a big problem for me in creating my website(glimpseofspace)
3rd Dec 2018, 12:27 AM
Kyle
Kyle - avatar
+ 1
Surgarypeaches68 glad I could help!
4th Dec 2018, 4:12 AM
Zeke Williams
Zeke Williams - avatar
+ 1
checkout sweet alerts its helps create fancy popus with javascript
4th Dec 2018, 3:43 PM
Asaølu Elïjah
Asaølu Elïjah - avatar
0
It comes very early in the tutorial you are studying. Maybe you overread it?
2nd Dec 2018, 8:40 PM
HonFu
HonFu - avatar
0
yeah ZW that’s what i meant thanks. reason i wanted just js cause i was making a bookmark and you can put js only in it
4th Dec 2018, 2:44 AM
Surgarypeaches68
Surgarypeaches68 - avatar