nevermind, seen you already got this

Liam Potter wrote:
wouldn't it make more sense to do this

$(function(){
   $("a.thumb").fancybox();
});

umcosta wrote:
Ok, here is what I want to do (extracted from: http://docs.jquery.com/Traversing/hasClass):

<script src="http://code.jquery.com/jquery-latest.js";></script>
<script>
  $(document).ready(function(){

    $("div").click(function(){
      if ( $(this).hasClass("protected") )
        $(this).animate({ left: -10 }, 75)
               .animate({ left: 10 }, 75)
               .animate({ left: -10 }, 75)
               .animate({ left: 10 }, 75)
               .animate({ left: 0 }, 75);
    });

  });
  </script>


And here is my code:

<script type="text/javascript" src="scripts/jquery.js"></script>
<script type="text/javascript" src="scripts/jquery.localscroll.js"></
script>
<script type="text/javascript" src="scripts/jquery.scrollto.js"></
script>
<script type="text/javascript" src="scripts/jquery.fancybox.js"></
script>
<script type="text/javascript">
    $(document).ready(function(){

        $.localScroll();

        $("a").click(function(){
           if ( $(this).hasClass("thumb") )
                  $(this).fancybox();
        });

    });
    </script>

Any ideas???

Reply via email to