Create a Simple modal popup

jquery

Solution

It surely IS possible without plugins, but that might turn out as serious plumbing. I've used 'home-made' modal windows implementation in pure javascript myself. Trust me - it's not a good idea. Even with jQuery (do not confuse with jQuery UI).

I would recommend you 'SimpleModal' plugin by Eric Martin (he is on StackOverflow too and has at least tried to answer every question that's related with his product). I like it's API and it works like a charm.

Problem

I have a very simple requirement. I have two div. Div1 with a Link and Div2 contains some text. On the click of the link in Div1, I want to display Div2 as a simple modal popup with a grey background and a close button. Now is it possible to do so without using any external plugins. If not, then i checked a plugin on jqueryui. However there are so many jquery and css files referenced in teh example, that I do not know what to take and what to leave.

Original source