0

I've been checking similar posts and none of the solutions I've found have worked. Here's all of those code. I don't get any errors in the console.

<!doctype html>
<html lang="en">
    <head>
        <meta charset="utf-8" />

        <title>jQuery UI Test Holder</title>

        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.css" type="text/css" media="screen" />

        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
        <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.pack.js"></script>

        <script>

            $(document).ready(function(){
                $('.open').fancybox({
                    type:"iframe"
                });
            });
        </script>
    </head>

    <body>

        <a class="open" href="https://google.com">OPEN</a>
    </body>
</html>
Elliot
  • 1,893
  • 4
  • 17
  • 35

1 Answers1

1

Syntax error: Remove the extra semicolon ;:

$(document).ready(function () {
    $('.open').fancybox({
        type: "iframe"     <-- HERE
    });
});
CodeGodie
  • 12,116
  • 6
  • 37
  • 66
  • Thanks, I caught that one a bit earlier and updated my post with the change. – Elliot Oct 08 '15 at 20:10
  • Well, now its not going to work because you are trying to place www.google.com on an iframe. They do not allow that. Check this out: http://stackoverflow.com/questions/27358966/how-to-set-x-frame-options-on-iframe – CodeGodie Oct 08 '15 at 20:14
  • Okay thanks. I got the frame to load which was what I was struggling with. Thanks for the link too, I'll have to keep that in mind. Google was just for testing. – Elliot Oct 08 '15 at 20:16