user1269625
user1269625

Reputation: 3209

Lightbox is messing up my jquery

I have a problem with my lightbox...it works fine but I also have jQuery in my code and for some reason it messes up the jquery..why is it doing this?

Here are my script tags...

<script type="text/javascript" src="http://www.willruppelglass.com/js/jquery-1.7.1.js"></script>
<script type="text/javascript" src="http://www.willruppelglass.com/js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="http://www.willruppelglass.com/js/prototype.js"></script>
<script type="text/javascript" src="http://www.willruppelglass.com/js/scriptaculous.js?load=effects,builder"></script>
<script type="text/javascript" src="http://www.willruppelglass.com/js/lightbox.js"></script>

and here is my jQuery...

<script type="text/javascript">
    $(".galleryNavToggle").on("mouseenter", function (event) {
        $('#headerNavGallery, #headerNavInfo').hide();
        $("#headerNavGallery").show();
    });

    $(".galleryNavInfoToggle").on("mouseenter", function (event) {
        $('#headerNavGallery, #headerNavInfo').hide();
        $("#headerNavInfo").show();
    });


$(window).bind('load', function() {  

    var div_height = $("#content").height();
    $(".leftSideBar").css("height", div_height);

    var div_height = $("#content").height();
    $(".rightSideBar").css("height", div_height);

});



</script>

I dont know why its messing everything up :( any help would be apperiated. Thanks

Upvotes: 0

Views: 529

Answers (2)

dknaack
dknaack

Reputation: 60448

You dont need to put jquery-1.7.1.js and jquery-1.7.1.min.js in your page.

The jquery-1.7.1.min.js is the minified version of jquery-1.7.1.js. The content is the same. Use only jquery-1.7.1.min.js

Update

You forgot to wait until the DOM is fully builded. Try this

<script type="text/javascript">
    $(function() {
        $(".galleryNavToggle").on("mouseenter", function (event) {
            $('#headerNavGallery, #headerNavInfo').hide();
            $("#headerNavGallery").show();
        });

        // other content
    }
</script>

Upvotes: 2

ShankarSangoli
ShankarSangoli

Reputation: 69905

It is the protoype.js which is messing up jQuery.

Also why are you inlcuding unminified and minified jQuery file? Only one is required preferably the minified version.

Upvotes: 0

Related Questions