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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:05:26+00:00 2026-05-27T21:05:26+00:00

I’ve got a strange problem. I’ve been using just javascript forever now, and I’m

  • 0

I’ve got a strange problem.

I’ve been using just javascript forever now, and I’m wanting to switch to jquery, so I’ve got the latest jquery loaded, and some things work, like replaceWith(), but any thing that animates won’t work. It’s a really strange problem, but I’m getting no errors in the console and I’m clueless what’s wrong…

The site’s code is really compressed and not easily readable, but please have a look and see if you see the issue. For instance, go to the page in the link and click the “Languages:” box on the left. What should happen is when you click the H3, the div #langlis which is set to display none by default, should show. But nothing’s happening.

The jQuery replaceWith works, that’s in use on the Virus scanning bit on the right, click to scan for viruses and you’ll see it working, so some jQuery stuff works, but not the simpler stuff. 🙁

http://filequake.com/download-itunes-x64/

Thanks.

  • 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-27T21:05:26+00:00Added an answer on May 27, 2026 at 9:05 pm

    When you call $("#langs_h3").click(function() {... a query is performed on the document and every #langs_h3 element found gets the event listener function that you are providing attached to the Click event (by the click() method of the $() object).

    But, in your page, the H3 element you are looking for still does not exist by the time the interpreter reaches your Javascript code, because your code appears before the <h3> tag.

    There are two things you can do. You could move your code to the bottom of the page, or you could keep it at the top but put it inside a function, and call jQuery() passing that function as an argument:

    jQuery(function(){
      // your code here
      $("#langs_h3").click(function() { /* ... */ }
    });
    

    This second suggestion is common practice, and lets you keep all your javascript inside the
    <header> section, wich is recommended. The jQuery function realizes you are passing a function and will not execute it right away, but rather store it and call it once the Document onLoad event occurs (similar to putting the code at the bottom of the page). The H3 element you are looking for will exist by then.

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

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
I am reading a book about Javascript and jQuery and using one of the
I have just tried to save a simple *.rtf file with some websites and
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I used javascript for loading a picture on my website depending on which small
I've got a string that has curly quotes in it. I'd like to replace
this is what i have right now Drawing an RSS feed into the php,
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I am currently running into a problem where an element is coming back from

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.