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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:17:56+00:00 2026-05-23T07:17:56+00:00

While working on an answer to this question I created this jsfiddle . For

  • 0

While working on an answer to this question I created this jsfiddle. For some reason it isn’t working, and when I used firebug’s error consol it was returning that “.show” is not a function. This leads me to believe that jsfiddle is incorrectly loading jQuery. Are there any known issues between JSFiddle and jQuery? Is my code simply incorrect (BTW when I change .show("slow") to .style.display = "inherit" it works fine which is why I think it has to be a problem with jQuery…)

A working JSFiddle would be greatly appreciated.

  • 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-23T07:17:57+00:00Added an answer on May 23, 2026 at 7:17 am

    A couple of issues:

    1. You forgot a }.
    2. You’re calling jQuery methods on elements that aren’t wrapped in a jQuery object. You would need to do:
    $(itemName.getElementsByTagName("span")[0]).show("slow");
    

    (Note the wrapping). jQuery methods don’t magically extend default elements, the object must be wrapped first.

    Note now that this version works.

    EDIT:

    Alternatively, you could use the second parameter of jQuery’s construct (scope) and shorten this code:

    function showy(itemName) {
        $('span:first',itemName).show("slow");
    }
    function closy(itemName) {
        $('span:first',itemName).hide("slow");
    }
    

    EDITv2

    Juan brought up a good point, you should also separate javascript with markup. By this I mean avoid using the on* attributes of the elements, and keep the bindings within the external .js file or <script> tags. e.g.

    <head>
      ...
      <script src="http://path.to/jquery.js">
      <script>
        $(function(){ // execute once the document is ready (onload="below_code()")
    
          // bind to the buttons' hover events
          // find them by the "button" and "white" class names
          $('.button.white').hover(function(){ // hover event (onmouseover="below_code()")
    
            // find the first span within the link that triggered the event
            $('span:first',this).show('slow');
    
          },function(){ // mouse out event (onmouseout="below_code()")
    
            // likewise, find first span
            $('span:first',this).hide('slow');
    
          });
        });
      </script>
      ...
    </head>
    
    <body>
      ...
      <a href="#" class="button white" id="button1">
        <span id="spanToShow">SHOW: this text&nbsp;</span>
        on hover
      </a>
      ...
    </body>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have looked everywhere for the answer to this question and while there are
Unfortunately, the answer to this question isn't quite as simple as it sounds... but
While working on a project, I came across a JS-script created by a former
While working on an existing project I suddenly got the following error when trying
I've been working on this project for a while, it's a new language for
I just read the accepted answer of this question , which left me with
Well this is probably a stupid question with a simple answer but when using
I am pretty much worried to make a duplicate with this question while more
(there is a follow up to this question here ) I am working on
I've already read this but it doesn't answer to my question. Here's my scenario:

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.