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 8653513
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T14:33:46+00:00 2026-06-12T14:33:46+00:00

The code below was fully working when it was placed inside <script></script> tags on

  • 0

The code below was fully working when it was placed inside <script></script> tags on the running page. I since moved the code to an outside .js file for organizational purposes which caused the code to stop working – nothing happens when certain events should be fired. I ensured that the script was being included on the given page, and furthermore, I ensured that the link was valid through “view-source” (when I clicked on the script’s path, the script loaded in a new window).

The script declarations:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script src="js/main.js"></script>

So, what does my JS look like in this external file?

(function(){

$('#display-reply-box').click(function(){
    $(this).hide();
    $('#submit-reply-wrapper').show();
});

})(jQuery);

I removed most of the methods for readability, but that is how the file is setup. I ensured that there were no .js errors in the console, however, I did get the following errors regarding jQuery and Firelite

Failed to load resource: the server responded with a status of 404 (Not Found) http://getfirebug.com/releases/lite/skin/xp/pixel_transparent.gif
Failed to load resource: the server responded with a status of 405 (Method Not Allowed) http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js

I would assume the above errors have something to do with the problem I’m experiencing, although I’ve had no luck getting them to disappear. At times the errors are there, other times they are not.

  • 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-06-12T14:33:47+00:00Added an answer on June 12, 2026 at 2:33 pm

    It seems as though you’re attempting to run something on an element that might not have loaded in the DOM. Try wrapping it in a DOM Ready event handler like this:

    (function($) {
        $(document).ready(function() {
            $('#display-reply-box').click(function(){
                $(this).hide();
                $('#submit-reply-wrapper').show();
            });
        });
    })(jQuery);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've encountered code below and I'm not fully sure what it's achieving. I think
The code is fully copied below. <!DOCTYPE html> <html> <head> <meta charset=UTF-8 /> <title>Avaliações</title>
Code below is working well as long as I have class ClassSameAssembly in same
All code below is a stand-alone working example (greatly simplified) of what I am
In codeIgnator frame work the below is my code working properly.But i cannot control
OK, several questions about the test code below... I don't have the full working
Hello I have the code below that for some reason is not working: I
I am using File::Find in the code below to find the files from /home/user/data
I have a simple file uploader, which thanks to stackoverflow is now fully working,
Below is a file iterarot unction I have working on that iterates over folders

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.