javascript - images gallery fancybox not working -


i have been trying no luck fancybox

in head link page

<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.min.css"> 

here links cdnjs

<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script> <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.6/jquery.mousewheel.min.js"></script> <script src="http://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.pack.js"></script> <script src="js/main.js"></script> 

here code in js

  $("a .fancybox").fancybox({         openeffect  : 'none',         closeeffect : 'none'     });  $("a[href$='.jpg'],a[href$='.jpeg'],a[href$='.png'],a[href$='.gif']").attr('rel', 'gallery').fancybox(); 

here html

    <section class="col-1 first">         <a class="fancybox" rel='gallery' href="images/my-office.jpg"><img src="images/my-office.jpg" /></a>          <h3>my office</h3>         <p>this called "the circle of neglect".</p>     </section>      <section class="col-1">         <a class="fancybox" rel='gallery' href="images/my-cousin.jpg"><img src="images/my-cousin.jpg" alt="eli newton" title="eli newton" /></a>         <h3>my dear cousin</h3>         <p>my cousin canada.</p>     </section> 

in code, need remove space between element , class since supposed referencing same object. in other words, this

$("a .fancybox") 

should be

$("a.fancybox") 

cheers!


Comments

Popular posts from this blog

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -

python 3.x - Mapping specific letters onto a list of words -