www.webdeveloper.com
Results 1 to 3 of 3

Thread: Two scripts on same page

  1. #1
    Join Date
    Sep 2010
    Posts
    5

    Two scripts on same page

    Hello! I know this was asked before but the answers that were given didn't help me. I'm currently working on my portfolio website for my Portfolio class and I'm having trouble getting lightbox to work along with the rainbow image effect I have in the banner. (http://torenh.webs.com/site/index.html) The problem is on this page. http://torenh.webs.com/site/print.hml and the code loading the scripts are like this:

    Code:
    	<title>TOREN HANN - GRAPHIC DESIGNER & WEB DEVELOPER - PORTFOLIO</title>
        <link rel="stylesheet" type="text/css" href="../css/stylesheet.css"/>
        <link rel="stylesheet" href="../css/lightbox.css" type="text/css" media="screen" />
    	<script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.js"></script>
    	<script type="text/javascript" src="../jquery.color.js"></script>
    	<script type="text/javascript" src="../js/prototype.js"></script>
    	<script type="text/javascript" src="../js/scriptaculous.js?load=effects,builder"></script>
    	<script type="text/javascript" src="../js/lightbox.js"></script>
    	<script type="text/javascript">
    		$(document).ready(function() {
    			
    			spectrum();
    			
    			function spectrum(){
    				var hue = 'rgb(' + (Math.floor(Math.random() * 256)) + ',' + (Math.floor(Math.random() * 256)) + ',' + (Math.floor(Math.random() * 256)) + ')';
    				$('#banner').animate( { backgroundColor: hue }, 1000);
    				spectrum(); 
    		   	}
    			
    		});	
    	</script>
    How would I go about making these two scripts not conflict with each other and run correctly? I'm rather new to using java. Thanks for your time.

  2. #2
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654

  3. #3
    Join Date
    Sep 2010
    Posts
    5
    thanks for the help but i can't get it to work. i don't understand what i change "div" and "someid" to.

    Code:
    <script>
        jQuery.noConflict();
        // Use jQuery via jQuery(...)
        jQuery(document).ready(function(){
            jQuery("div").hide();
        });
        // Use Prototype with $(...), etc.
        $('someid').hide();
      </script>
    i tried naming them banner and lightbox but i guess thats not how that works.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles