Fancybox with $.ajax conflict "TypeError: loading is undefined"
Hi friends,
I'm doing a web site where i have a fancyBox, the code bellow:
$.fancybox({scrolling:'no',href:'MyPage.aspx?param='+carreserved,autoScale: false, overlayOpacity: '0.8', hideOnOverlayClick: false, showNavArrows: true,type: 'iframe',width:'100%',height:'400%',onClosed:function(){
showGreyBox();
}});
When i close the fancy box, call the method showGreyBox(), code bellow:
function showGreyBox() {
try {
//carrega pagina com box dentro de div greyBoxAlign
$.ajax({ type: "GET", url: "MyPage.aspx" }).done(function (data) {
$("#greyBoxAlign").html(data);
var verifyRese = $("[id$=_INFMENT]").val();
});
} catch (ex) {
alert(ex);
}
}
So, this method make a ajax request when close the fancybox. When i try to call the fancybox again show the message "cannot call method 'hide' of undefined". I found some resolutions, speaking this error is a conflit. I tried many ways to solve this problem with the method noConflit(), but any one worked.
Can some body help me with this problem?
thank you