I have atleast 20 links in a page and on each link i have to show a popup with different content.Is there any way that i can call only one javascript function and pass it id of div that has to be displayed as popup.My html structure looks like this
<div id='1'>
<a href='#'>Moreinfo</a>
<div id='popup1'>
Content for first link
</div>
</div>
<div id='2'>
<a href='#'>Moreinfo</a>
<div id='popup2'>
Content for first link
</div>
</div>
Also if i click other link first one should close. Please give suitable example in reply. Thanks
classand make use ofthis