Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6625429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:46:28+00:00 2026-05-25T21:46:28+00:00

My code of my Script is given below. <script type=text/javascript src=http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js></script> <script type=text/javascript src=scripts/prototype.lite.js></script>

  • 0

My code of my Script is given below.

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>       
    <script type="text/javascript" src="scripts/prototype.lite.js"></script>
    <script type="text/javascript" src="scripts/moo.fx.js"></script>
    <script type="text/javascript" src="scripts/moo.fx.pack.js"></script>
    <script type="text/javascript">
    function init(){
        alert('init function called');
        var stretchers = document.getElementsByClassName('box');
        var toggles = document.getElementsByClassName('tab');
        var myAccordion = new fx.Accordion(
            toggles, stretchers, {opacity: false, height: true, duration: 600}
        );
        //hash functions
        var found = false;
        toggles.each(function(h3, i){
            var div = Element.find(h3, 'nextSibling');
                if (window.location.href.indexOf(h3.title) > 0) {
                    myAccordion.showThisHideOpen(div);
                    found = true;
                }
            });
            if (!found) myAccordion.showThisHideOpen(stretchers[0]);
    }
    </script>   

    <script type='text/javascript' src='javascripts/jquery-1.3.2.min.js'></script>
    <script type='text/javascript'> 

      var verticalAdjuster = .30;
      var backgroundSpeed = .15;
      var childrenSpeed = .05;
      var dogSpeed = -.03;
      var ground = -.00;

      jQuery(document).ready( function(){  
        alert('other function called');
        $("#painting").mousemove( function(e){

          var x = 750 - (e.pageX - this.offsetLeft);
          var y = 435 - (e.pageY - this.offsetTop);
          //$("#city").css("background-position", (backgroundSpeed*x) + " " + (backgroundSpeed*verticalAdjuster*y));
          $("#city").css("top", (backgroundSpeed*verticalAdjuster*y));
          $("#city").css("left", (backgroundSpeed*x));
          //$("#city").css("right", (backgroundSpeed*x*(-10)) );
          $("#tree").css("top", (childrenSpeed*verticalAdjuster*y) + "px");
          $("#tree").css("left", (childrenSpeed*x) + "px");
          $("#boyAndBitch").css("top", (dogSpeed*verticalAdjuster*y) + "px");
          $("#boyAndBitch").css("left", (dogSpeed*x) + "px");        
        });
      });

    </script>

The issue is that only the later script is running right now. But if I remove the <script type='text/javascript' src='javascripts/jquery-1.3.2.min.js'></script> from where it is, and place it on the top, then only the init() function works and not the later.

Can you please explain me how can I solve this issue.

Regards
Zeeshan

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T21:46:28+00:00Added an answer on May 25, 2026 at 9:46 pm

    You’re including jQuery up at the very top, then Prototype right after that, then jQuery again at the bottom. The higher of the two script blocks appears to exclusively use Prototype, the lower of the two, exclusively jQuery.

    Each of those includes is going to re-define $. By moving the initially-lower jQuery 1.3.2 inclusion to “the top”, I assume you’re placing it above your Prototype script tag.

    So, down in your jQuery(document).ready callback, the $ has been hijacked by Prototype and you get errors because your code is written expecting that $ is jQuery.

    What you should do is:

    • Only use one version of jQuery on this page. Pick one and go with it.
    • Call jQuery.noConflict(). Given the ordering you have now, things may work fine without it, but it’s a good idea anyway, and will keep things from breaking if you change the order you include your libraries in.
    • Change the beginning of your jQuery code to:

      jQuery(document).ready(function($) {
      

      Adding that $ as a parameter to the ready callback will let you use the $ shortcut within the callback.

    Or, if you control all this code, just stick with either Prototype or jQuery, whichever you prefer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Code given below is taken from the stackoverflow.com !!! Can anyone tell me how
For example, my goal is to test the code given here: PHP script that
I have java script code to set some of the properties of ajax controls.
I've been trying to code a Perl script to substitute some text on all
Below is partial code to an experimental http server app I'm building from scratch
I have an issue with this jquery code below. Please give me advice or
Consider the automation-compatible COM library in C#, given below. It follows a common COM
I use the below code to assign a given by the user character to
I am working on a comment script using ajax, json and jquery. I have
For some reason the script below is not working. This is the code I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.