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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T02:00:31+00:00 2026-05-30T02:00:31+00:00

I created a document that loads a .js document that has some JQuery functions

  • 0

I created a document that loads a .js document that has some JQuery functions that I have created. I would like to use the firebug console to quickly test the functionality of these functions on my html document. But when I try and call these function in the console I don’t get any response.

for example:

  • I have index.html that call my JS:

    <script src="jquery.js" type"text/javascript"></script>
    <script src="myfunctions.js" type="text/javascript"></script>
    
  • Myfuntions.js has the following defined in it:

    function showAbout(){
      $('div#about').show("slow");
      $('.navbar #about-button').attr('disabled', true); 
    }
    

The Problem:

When i try to call showAbout or showAbout() from the console on index.html I don’t get any changes. However, when I call $('div#about').show("slow"); or $('div#about').show("slow"); from the console directly I get the expected behavior.
What is the proper way to call a user defined function from the console?

  • 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-30T02:00:32+00:00Added an answer on May 30, 2026 at 2:00 am

    If showAbout is defined at the global scope, you should be able to write showAbout(); in the console and see the result. If not, then you’re probably putting your functions in a scoping function like so:

    (function() {
        function showAbout() {
        }
    })();
    

    If so, good for you, you’ve avoided created global variables/functions. But it does mean you can’t access those functions from the console, because the console only has access to global scope.

    If you want to export any of those so you can use them from the console (perhaps only temporarily, for debugging), you can do that like this:

    (function() {
        window.showAbout = showAbout;
        function showAbout() {
        }
    })();
    

    That explicitly puts a showAbout property on the global object (window) referencing your function. Then showAbout(); in the console will work.

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

Sidebar

Related Questions

I have created a class that parses some document from file. class Parser {
I have created a script that saves some files in the Documents directory of
I would like to create an application that downloads a PDF document from the
I have an application that I would like to embed inside our companies CMS.
I have created an iframe code that I want people to use as a
I have set up some test code that loads in a youtube video and
I have tried to use some of the max length functions found here, but
I've created a program that creates and populates a custom document property in an
I have existing java code and need to create Design Document based on that.
I'm looking to create a document like this: <root/> That I can add children

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.