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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T11:43:13+00:00 2026-06-07T11:43:13+00:00

I have a simple hide/unhide div section using simple JavaScript. I need to have

  • 0

I have a simple hide/unhide div section using simple JavaScript. I need to have an arrow image, which will toggle the content visibility when clicked, and I want the little arrow to toggle between right/down positions when the content is hidden and unhidden.

HTML content:

<a href="javascript:showOrHide();"><img src="Image_Files/Copyright.png" alt="BioProtege Inc" border="0" /></a> 
<img src="Image_Files/Copyright_Arrow_Hidden.png" alt="Arrow" border="0" />

<div id="showorhide">
Copyright 2012+ BioProtege-Inc.Net | LG Fresh Designz
<br />
Contact Us @ Lane.Gross@Edu.Sait.Ab.Ca
</div>

JavaScript content:

function showOrHide() 
{
    var div = document.getElementById("showorhide");
    if (div.style.display == "block") 
    {
        div.style.display = "none";
    }
    else 
    {
        div.style.display = "block";
    }
}
  • 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-06-07T11:43:14+00:00Added an answer on June 7, 2026 at 11:43 am

    You would just use simple Javascript to change the image’s src attribute between the two arrows, at the same time you are changing the display attribute:

    <script type="text/javascript">
    function showOrHide() 
    {
        var div = document.getElementById("showorhide");
        if (div.style.display == "block") 
        {
            document.getElementById("img-arrow").src = "Image_Files/arrow-hidden.jpg";
            div.style.display = "none";
        }
        else 
        {
            div.style.display = "block";
            document.getElementById("img-arrow").src = "Image_Files/arrow-showing.jpg";
        }
    }
    </script>
    
    <img src="arrow-hidden.jpg" id="img-arrow" alt="" />
    
    <div id="showorhide">
    Copyright 2012+ BioProtege-Inc.Net | LG Fresh Designz
    <br />
    Contact Us @ Lane.Gross@Edu.Sait.Ab.Ca
    </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple toggle function to show and hide content. It is triggered
I have a simple toggle for a div attached to a chekbox. $('#step2').hide(); $('#toggle-check').click(function(){
I have simple scenario in which i hide and show a signle MenuItem in
I have a simple jquery function which I use to show/hide some divs. The
I have created a simple expand/hide test script: <html> <head> <script type=type/javascript><!-- function showHide(elementid){
I have a simple HTML page that contains two tabs that show/hide content in
I have some simple jQuery toggle script like this: <script type=text/javascript> $(document).ready(function() { $('#clickedit').click(function()
i have a simple show/hide div and a form on the div, but when
I have a simple jquery script that shows and hides div block: <script type=text/javascript>'
I have a simple dropdown menu and I'd like to have this menu close/hide

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.