saimaz saimaz - 1 year ago 173
jQuery Question

$.fancybox.close() not working

I know that question was discussed plenty of times, but i tried all suggestions and noone didn't work. I am using fancybox with href atribute where content is loading using ajax.


And in content i had custom close button

<a href="javascript:void(1)" title="close" onclick="$.fancybox.close()">Pirkti prekes</a>

And when i click that i got $.fancybox is undefined.

Answer Source

Instead of making a onclick it should look like

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