• 0

Lightbox script is breaking Scrollbar script


Question

Hello! I am having an issue with 2 scripts breaking each other.

I have a javascript scrollbar that keeps disappearing once I add the additional script for the lightbox under it.

The lightbox works fine once added but than the scrollbar just disappears and all scroll function breaks.

Here is the site with scrollbar: http://portalpacific.net/pp11/

 

I am very new to javascript so maybe I am just missing something?

Thanks!

 

Here are the 2 scripts from my HTML Document.

    <!-- Scrollbar -->
    <script>
    $(function() {
        // To keep track of how many images have loaded
        var loaded = 0;

        // Let's retrieve how many images there are
        var numImages = $("#projectdisplay img").length;

        // Let's bind a function to the loading of EACH image
        $("#projectdisplay img").load(function() {
            // One more image has loaded
            loaded = loaded + 1;

            // Only if ALL the images have loaded   
            if (loaded === numImages) {
                // This will be executed ONCE after all images are loaded.
                $("#projectdisplay .VenScrollBar").VenScrollBar({
                    push: true,
                    withArrows: true,
                    barWidth: 18,
                    tArrowHeight: 18,
                    bArrowHeight: 18,
                    tBarHeight: 3,
                    bBarHeight: 3,
                    tTrackHeight: 0,
                    bTrackHeight: 0,
                    decorationHeight: 12,
                    barHeight: "106%"
                });
            }
        });
    });
    </script>


<!-- Lightbox -->
<script>$(document).ready(function(){

	/* default settings */
	$('.venobox').venobox(); 


	/* open content with custom settings */
	$('.venobox_custom').venobox({
		framewidth: '300px',
		frameheight: '250px',
		border: '6px',
		bordercolor: '#ba7c36',
		numeratio: true,
		infinigall: true
	});

	/* auto-open #firstlink on page load */
	$("#firstlink").venobox().trigger('click');
});
 </script>

Thanks for any help!

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

This topic is now closed to further replies.