I am having an issue with FancyBox and its probably really simple to fix but I can't figure it out. I have a link and when the link it clicked, I want it to open external page. But the problem is the link just refreshes the current FancyBox, and never opens the other page. Here is my code:
$("#preview-box").html('<a href="http://www.google.com" target="_blank" >Go To Original</a><iframe sandbox="allow-forms allow-scripts" src="http://www.yahoo.com" width="100%" height="100%" style="min-height: 500px;"></iframe>');
$('#preview-box').fancybox({
autoSize: false,
width: '80%',
height: '80%',
onClosed: function () {
$("#preview-box").empty();
},
afterClosed: function () {
$("#preview-box").empty();
}
}).trigger('click');
My question is why isn't the new link opening up in a new tab and just refreshing the current content, and how can I get this to work?