Guru Guru - 5 months ago 40
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?.


you could assign same class to Btn1 and Btn2.

And you could use fancybox with that class.