title: Fancybox with MVC Razor
body: <p>I have an issue with fancybox not loading in razor view engine. I have
  all the js/css loaded in correctly (I've tested to make sure fancybox
  works with a simple video link, it did). So the error is likely somewhere in
  the code below.</p>
  
  <p>On the page:
  The parent view contains a list of links, each needs to open in its
  own fancybox and load the corresponding view.</p>
  
  <pre><code>$(document).ready(function () {
      try {
              $("a.className").fancybox({
              (style stuff)
              'type': 'ajax'
             });
  
           } catch (ex) {
               console.log(ex);
           }
  });
  </code></pre>
  
  <p>And the link itself:</p>
  
  <pre><code>&lt;div class="className"&gt;
      &lt;span class="spanName"&gt;
          @Html.ActionLink("LinkName", "Action", new { id = Model.ID })
      &lt;/span&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Any ideas? I'll provide more code if needed. Thanks.</p>