Fancybox.ajax not functioning

Why is this:


<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<style>
* {
 margin: 0;
 padding: 0;
}
html,
body {
 width: 100%;
 height: 100%;
}

body {
 background: #CCC;
}
#menu {
 display: block;
 margin: 100px auto;
}
</style>
<link
      rel="stylesheet"
      type="text/css"
      href="css/jquery.fancybox.css">
      <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
      <script type="text/javascript" src="js/site/jquery.fancybox-1.3.4.pack.js"></script>
</head>
<body>
<ul id="menu">
  <li><a class="various fancybox.ajax" href="content.php">Ajax</a></li>
</ul>
<script type="text/javascript">
$(document).ready(function() {
    $(".various").fancybox({
        maxWidth    : 800,
        maxHeight   : 600,
        fitToView   : false,
        width       : '70%',
        height      : '70%',
        autoSize    : false,
        closeClick  : false,
        openEffect  : 'none',
        closeEffect : 'none'
    });
});
</script>
</body>
</html>

not functioning while I have it straight from the Fancybox website and all things(plugins css and images) are in place. Instead of opening content in Fancybox It opens by it self as you can see here

Hi donboe,

If you look at the console you see:

Uncaught TypeError: Cannot read property 'msie' of undefined jquery.fancybox-1.3.4.pack.js:18

The reason for this is that $.browser was removed from jQuery starting with version 1.9. It is now available as a plugin.

Try reverting to jQuery 1.8 and see if that helps.

Hi Pullo. Thank you for notifying me about this. I t had to do with this one:

<script type="text/javascript" src="js/site/jquery.fancybox-1.3.4.pack.js"></script>

I replaced it with the normal fancybox:

<script type="text/javascript" src="js/site/jquery.fancybox.js"></script>

and it is working great!

Good stuff!

That is actually the better solution as it’s generally recommended to avoid browser detection, which is why the method was removed.

I wasn’t sure if fancybox had caught up or not , but obviously it has :slight_smile: