Guru Guru - 1 year ago 82
jQuery Question

jQuery fancybox issue - want to show 1 section

I want to create dialog using fancybox but failed.

For instance

<a class='btn'>Btn1</a>
<a class='btn'>Btn2</a>
<div class='fancycontent'> Fancy Content</div>

If you click btn1 or btn2 'fancycontent' should appear as popup.

How can I implement this without duplicating div tag into every a tag?.

Answer Source

you could assign same class to Btn1 and Btn2.

And you could use fancybox with that class.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download