saimaz saimaz - 7 months ago 102
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.


Instead of making a onclick it should look like