Erwin Augustijn
Erwin Augustijn

Reputation: 101

Conflict between Fancybox and other JQuery

i'm using 3 different JQuery plugins to build a website.

But, there's a small problem. The first 2 plugins work happily together, but when I insert Fancybox, one of the plugins (mostly Fancybox, but sometimes Sliding Login) will be disabled and behaves himself as it would do without JQuery.

<!-- PNG FIX for IE6 -->
<!-- http://24ways.org/2007/supersleight-transparent-png-in-ie6 -->
<!--[if lte IE 6]>
    <script type="text/javascript" src="js/pngfix/supersleight-min.js"></script>
<![endif]--> 
<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js'></script>
<script src="js/jquery.localscroll-min.js" type="text/javascript"></script>
<script src="js/jquery.scrollTo-min.js" type="text/javascript"></script>
<script type="text/javascript" src="js/jquery.fancybox.js?v=2.0.6"></script>
<script type="text/javascript" src="js/jquery.mousewheel-3.0.6.pack.js"></script>

<script type="text/javascript">
$(document).ready(function () {

    $.localScroll.defaults.axis = 'x';
    $.localScroll();

    // Expand Panel
    $("#open").click(function(){
        $("div#panel").slideDown("slow");

    }); 

    // Collapse Panel
    $("#close").click(function(){
        $("div#panel").slideUp("slow"); 
    });     

    // Switch buttons from "Log In | Register" to "Close Panel" on click
    $("#toggle a").click(function () {
        $("#toggle a").toggle();
    });

    $("a.fancybox").fancybox();
});
</script>

And here's the link:

<a class="fancybox" href="http://www.google.nl?id=<? echo $selectusers2['UID'] ?>" title="<? echo $selectusers2['test']." ".$selectusers2['test']." ".$selectusers2['test']; ?>"><? echo abbreviation($selectusers2['test']." ".$selectusers2['test']." ".$selectusers2['test'],17,'...'); ?></a><br />

I hope someone will know why those are conflicting and likes to solve it :)

Upvotes: 0

Views: 5420

Answers (1)

JFK
JFK

Reputation: 41143

Fancybox v2.x requires jQuery v1.6 or later. Upgrade your version of jQuery

You could call the latest version of jQuery with this

<script src="http://code.jquery.com/jquery-latest.js"></script>

Upvotes: 2

Related Questions