Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Oct 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    JavaScript includes in <head>... possible to have too many?

    I have the following at the top of a page:

    Code:
    <script type="text/javascript" src="jquery.js"></script>
    <script type="text/javascript" src="thickbox.js"></script>
    <script type="text/javascript" src="mootools.svn.js"></script>
    <script type="text/javascript">
    	window.addEvent('domready', function(){
    	var scroll = new Scroller('container', {area: 100, velocity: 1});
    	$('container').addEvent('mouseover', scroll.start.bind(scroll));
    	$('container').addEvent('mouseout', scroll.stop.bind(scroll));
    	}); 
    </script>
    The problem is that whatever the last two are, those are the two that work, and the other two don't load. Right now, with the code above, jquery.js and thickbox.js will not load, but the later two things work fine. If I switched them around, jquery.js and thickbox.js would work, but the others wouldn't.

    This baffles me, however I'm not very experienced with JS so I might be missing something there. Anyone know what's up?
    Last edited by TheSalmonThief; 02-23-2009 at 01:31 AM.

  • #2
    Senior Coder rangana's Avatar
    Join Date
    Feb 2008
    Location
    Cebu City, Philippines
    Posts
    1,752
    Thanks
    65
    Thanked 372 Times in 365 Posts
    The two framework don't play well with each other as both uses $.

    You might find this link useful:
    http://docs.jquery.com/Using_jQuery_...ther_Libraries
    Learn how to javascript at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •