How to create a modal dialog box, for example, when you try to vote for stackoverflow?

I'm looking for some solution to create a modal dialog box, for example, when you are not logged in or do not have sufficient reputation, and try to vote for any question or answer when the stack overflows ... This is an orange box that appears .. .

Can someone help me?

+3
source share
4 answers
Dialogues

jQueryUI is a good choice. I also used SimpleModal and was very pleased with this: http://www.ericmmartin.com/projects/simplemodal/

+5
source

You can try the jQuery dialog .

+2

These are simple divs. No need to download jQuery for this.

<div class="error_hidden" id="error_dialog">Oops, there was an error!</div>

Write CSS for "error" and "error_hidden", then use the javascript event to change the class and position of the div, or better yet, create a new div dynamically when the event fires.

+1
source

Source: https://habr.com/ru/post/1770381/


All Articles