Reputation: 11
I've got a problem with my "FancyBox". I can't trigger it, insted it opens my "iframe" in another window. I've even tried to copy the code from another threat: here
But I really just can't make it work, what am I doing wrong??? Can anyone help me, as I really need to make this work before monday.. :(
Here's my code:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>ESTV | TV- og Videoproduktion</title>
<link href="style/style.css" rel="stylesheet" media="screen" type="text/css"/>
<link rel="stylesheet" href="http://fancyapps.com/fancybox/source/jquery.fancybox.css?v=2.1.0" type="text/css" media="screen" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
<script type="text/javascript" src="http://fancyapps.com/fancybox/source/jquery.fancybox.pack.js?v=2.1.0"></script>
</head>
<body>
And when I call it, I do it like this:
<a class="info" class="various" data-fancybox-type="iframe" href="http://fancyapps.com/fancybox/demo/iframe.html">Læs mere</a>
Upvotes: 1
Views: 351
Reputation: 24526
You haven't initialised the fancybox. You need something along the lines of this:
<script>
$(function()
{
$('a.info').fancybox();
});
</script>
Upvotes: 2