Skip to content Skip to sidebar Skip to footer

Adding Multiple Js Files In The Header

I'm trying to add two different javascript functions to my header: 1) is for a lightbox (see code below) and the 2) is for a local scroll (code below). When I place them both in

Solution 1:

You are using prototype w/ jQuery make sure you have jQuery.noConflict(); after your jquery framework script and prototype framework and before you run any main scripts. It is not recommended to use more than one JavaScript framework at the sametime.

<header><linkrel="stylesheet"href="/lightbox2.04/css/lightbox.css"type="text/css"media="screen" /><scripttype="text/javascript"src="/lightbox2.04/js/prototype.js"></script><scripttype="text/javascript"src="/lightbox2.04/js/scriptaculous.js?load=effects,builder"></script><scripttype="text/javascript"src="/jquery-vertical-scroll/js/jquery.min.js"></script><scripttype="text/javascript">
    jQuery.noConflict();
</script><scriptsrc="jquery-vertical-scroll/js/jquery.localscroll-min.js"type="text/javascript"></script><scriptsrc="jquery-vertical-scroll/js/jquery.scrollTo-min.js"type="text/javascript"></script><scripttype="text/javascript"src="/js/lightbox.js"></script><scripttype="text/javascript">jQuery(document).ready(function () {
            jQuery.localScroll.defaults.axis = 'y';
            jQuery.localScroll();
        });
</script></header>

give this a try

Post a Comment for "Adding Multiple Js Files In The Header"