user326638
user326638

Reputation:

Stackoverflow like modal popup in jquery

Which jquery modal plugin does stackoverflow uses (ie) When i try to close a question? Any suggestion..

Upvotes: 5

Views: 1115

Answers (2)

Sharique
Sharique

Reputation: 4219

There is a few model pop-up plug-ins few plugins for jQuery. The one is now part of jQuery UI is Dialog.

Upvotes: 1

Nick Craver
Nick Craver

Reputation: 630429

SO doesn't use a plugin, it's built just for SO, they just create a <div> and stick it in the page, with the following styling:

.popup {
  background-color:#fff;
  border:solid 10px #AE0000;
  -webkit-box-shadow:2px 2px 5px #000;
  -moz-box-shadow:2px 2px 5px #000;
  box-shadow:2px 2px 5px #000;
  z-index:1;
  display:none;
  position:absolute;
  padding:15px;
}

They just insert the created <div class="popup"> wherever it goes in the page, in this case it's appended to the parent of the clicked closed-question-nnnnnn link (the .post-menu div).

Aside from the internals, which would undoubtedly be different anyway, this is all you need to make a modal, you can view a quick demonstration here.

Upvotes: 6

Related Questions