-
-
Save bryanwoods/11453 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (document.images) { | |
var button1_up = new Image(); | |
button1_up.src = "collapse.gif"; | |
var button1_down = new Image(); | |
button1_down.src = "expand.gif"; | |
} | |
function switchButton1() { | |
if (document["button1"].src == button1_down.src) { | |
document["button1"].src = button1_up.src | |
} else { | |
document["button1"].src = button1_down.src | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script type="text/javascript" src=ImageToggle.js"> | |
</head> | |
<body> | |
<a href="#" onmousedown="switchButton1('button1'); return false;><img src="img/expand_btn.gif" id="button1" name="button1"/></a> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment