views:

234

answers:

2

Hi,

I need to show a page of contents inside my page.

ie; when i click on a link it will show 2 paragraphs inside a div as popup in the same page.

that popup must have a close button in it to close that div popup.

Is any one have an idea or code to help me in this

Thanks.

+1  A: 

You could use something like a jQuery modal dialogue box:

David Thomas
+1  A: 

Use hide properties for your div tag.

For hiding

document.getElementById('divid').style.display='none'; 

For displaying

document.getElementById('divid').style.display='block'; 
pavun_cool
i need this to be as a popup
tibin mathew
@tibin mathew, you need it to be a pop-up (as in a separate window that opens up above the web-page) or you want it to be a light-box/modal dialogue (a hidden `div` that pops up, but is *a part of the web-page itself*)? The code given by @pavun_cool would achieve the second aim.
David Thomas