0

I have created a show/hide javascript function which seems to work perfectly - When you click on the link it reveals the gif version of the logo.

The issue i'm having is when you first go onto the landing page click here you can see both images, it's only when you click on the still image the function works the way is should - only displaying one image at a time. Does anyone know how i can resolve this problem?

1
  • You should add 'display:none' in the css on the image you want to hide on load. Commented Jun 13, 2012 at 11:24

3 Answers 3

2

You'll have to give the image a display:none style as well to start with:

<img id="center-img-gif" alt="main-img" src="css/images/logo.gif" style="display:none;">
Sign up to request clarification or add additional context in comments.

Comments

0

use CSS property Display:none; for one of the images.

Comments

0

You can set display:none of one image at design time OR You can set display:none of one image on body onload

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.