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

  • Home
  • SEARCH
  • 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 7181159
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:29:55+00:00 2026-05-28T17:29:55+00:00

How do I prevent 2 .js files to be overwrite in my html code?

  • 0

How do I prevent 2 .js files to be overwrite in my html code?
I have 2 .js files one for scroll bars and another one for dropdown menu.
when I import both files in my template code, the first one won’t work (second one will overwrite the first one).

I’m confused how to prevent this and make both working.

  • 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-28T17:29:56+00:00Added an answer on May 28, 2026 at 5:29 pm

    well, overwrite is not the correct word for it. They might be conflicting eachother, due to global variables having the same name, perhaps. It’s impossible to find out what the problem is, without looking at them…

    jQuery and MooTools are known for interfering with eachother. You should use, in YOUR code, before anything else:
    In the begining of you login.js file put the following line:

    var J = jQuery.noConflict();
    

    and replace every $ for J

    then, on scroll.js, where you see this at the end:

    window.addEvent('domready', function(){             
        // -- first example, vertical scrollbar --
        makeScrollbar( $('scrollbox'), $('scrollbar'), $('handle') );
    });
    

    replace the makeScrollbar line for

    makeScrollbar( J('#scrollbox')[0], J('#scrollbar')[0], J('#handle')[0] );
    

    It should work fine but, as i said, you should look for a solution that uses only jQuery or Mootools

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

Sidebar

Related Questions

I have created an .htaccess files that will prevent anyone from accessing a file
In my en.yml translation file, I have: activerecord: errors: template: header: one: 1 error
In a project we are working on I would like to prevent several files
Trying to prevent access to a specific file, not any files with a certain
In a servlet I have a config text file. How to prevent web access
I have a JFrame that accepts top-level drops of files. However after a drop
If I have few csv files as follows: a,1,2,3 type, max, min, avg b,4,5,6
Say I have a bunch of files in folder A: 1.txt 2.txt 3.txt ...
I want to prevent sending file on hotmail/gmail accounts. Is it possible to track
I am trying to rename all the files present in a Windows directory using

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.