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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T01:49:19+00:00 2026-05-24T01:49:19+00:00

I have and index.html with jQuery loading and an external javascript(functions.js) file loading. But

  • 0

I have and index.html with jQuery loading and an external javascript(functions.js) file loading. But the functions inside the external js file won’t work. I can see both jQuery and the functions.js file loading in the resources tab on the chrome dev tools. Also if i cut and paste my function into the console it works. Please help.

$(document).ready(function () {
topMenuShare();
});

function topMenuShare(){
$('#topNavShare').click(function(){
    $('#shareMenu').show();
});
}

HTML below

<script type="text/javascript" src='js/jquery1.6.2.min.js'></script>
<script type='type/javascript' src='js/functions.js'></script>

UPDATE:
There are no error messages display, chrome dev tools, firebug and jsFiddle say things are fine. When I say it doesn’t work I mean the scripts load, no error messages, but when i click ‘#topNavShare’ the show() event does not fire.

The clickable element is a empty div with a height, width and background-image defined in CSS.

        <div id="topNav">
            <div id="topNavLogin" class="topNavButtons">
            </div>
            <div id="topNavShare" class="topNavButtons">
                <div id='shareMenu'>
                    <div id='shareMenuEmail' class='shareMenuitem'>
                    </div>
                    <div id='shareMenuFacebook' class='shareMenuitem'>
                    </div>
                    <div id='shareMenuTwitter' class='shareMenuitem'>
                    </div>
                    <div id='shareMenuGooglePlus' class='shareMenuitem'>
                    </div>
                </div>
            </div>
            <div id="topNavLiveChat" class="topNavButtons">
            </div>
            <div id="topnavSearch" class="topNavButtons">
            </div>
        </div>

CSS…

#topNav{
position: absolute;
width: 400px;
height: 25px;
top: 0px;
right: 15px;
}
.topNavButtons{
height: 25px;
float: left;
margin-right: 5px;
}
#topNavShare{
width: 60px;
height: 25px;
background-image: url('http://localhost:8888/assets/hpSprites.png');
background-position: -63px -41px;
}
#topNavShare:hover{
background-position: -63px -11px;
}

Hopefully this is helpful. Sorry if this seems frantic, i’ve been looking at this seemingly simple problem for a while and i have a fast approaching deadline.

  • 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-24T01:49:20+00:00Added an answer on May 24, 2026 at 1:49 am
    <script type='type/javascript' src='test.js'></script>
    

    should be

    <script type="text/javascript" src="test.js"></script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a index.html file which loads html files. $('#content').load(url,function() {}); Inside those html
in my code for index.html I use jQuery and have a link with id
I am using jQuery for a simple website and have a main page 'index.html'
Say I have jquery code like this: html += '<div class=index>' + item.index +
I have an upload script that write a index.html file, I modified it to
Absolute beginner question: I have a template file index.html that looks like this: ...
I have a page that contains an iframe that gets loaded using Javascript: index.html
I'm getting more into jQuery and so have set up a HTML/Javascript/CSS base site
I have html page which is located on hard disk (in the browser: file:///C:/index.html).
i am using php 5.2.8 i have index.html, which loads LOAD.PHP from IFRAME. iframe

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.