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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T23:45:30+00:00 2026-05-21T23:45:30+00:00

I am a relative newbie when it comes to jquery; my question pertains to

  • 0

I am a relative newbie when it comes to jquery; my question pertains to scope and perhaps to plugins if anyone has the patience to link me to something useful.

The code below works, however I must put the script in the same div for it to actually work. I can’t move it to the top of the page, or, ideally, to another library/source file for the purposes of CMS integration/readability. Any pointers would be appreciated, thank you.

<a id="hide" href="#" style="z-index:20;">hide</a>
<a id="show" href="#" style="z-index:20;">show</a>

<div id="block" style="position:absolute;background:#fff;width:450px;height:450px;">
</div>
<div id="myBox" style="width:450px;height:450px;" >
<ul id ="menuElem" class="CMSListMenuUL">
     <li><a href="#">a</a></li>
     <li><a href="#">b</a></li>
     <li><a href="#">c</a></li>
</ul>           
</div>
<script>

$("#show").click(function () {
  $("#block").fadeOut(1000);
  return false;
}); 
$("#hide").click(function () {
  $("#block").fadeIn(1000);
  return false;
}); 
</script>
  • 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-21T23:45:30+00:00Added an answer on May 21, 2026 at 11:45 pm

    Give this a try

    <script>
    $(document).ready(function () {
      $("#show").click(function () {
        $("#block").fadeOut(1000);
        return false;
      }); 
      $("#hide").click(function () {
        $("#block").fadeIn(1000);
        return false;
      }); 
    });
    </script>
    

    This waits for the script to run until after the document is already loaded.

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

Sidebar

Related Questions

I am a relative newbie when it comes to SQL Azure!! I was wondering
Can anyone explain the following behaviour to a relative newbie... const char cInputFilenameAndPath[] =
Just a simple question from a relative Java newbie: what is the difference between
I'm a relative newbie at Rails, so forgive me if my question's got an
I'm a relative newbie when it comes to database design. I know how to
I'm a relative newbie to thinking in OOP terms, and haven't yet found my
As a relative newbie I try to read as much as I can about
I am a relative newbie to Hadoop MapReduce. I was trying a variation of
Scheme relative URLs (network-path references) are something that I've just found out about -
I'm a relative newbie to web development. I know my HTML and CSS, and

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.