Quote:
Originally Posted by xelawho
are they always the same images? if so, just put them all into a hidden div and show/hide it depending on what happens with the checkbox
Code:
<html>
<head>
<style>
#picsdiv{
display:none;
}
</style>
</head>
<body>
<input type="checkbox" id="mycb" onclick="showHide(this)"/>
<div id="picsdiv">put your images here</div>
<script type="text/javascript">
function showHide(box){
document.getElementById("picsdiv").style.display=box.checked?"block":"none";
}
</script>
</body>
</html>
|
Yes they would all be the same image but eventually I would like to add a rollover or onclick event to each image. Would this still work?
ex: I would like one checkbox that when ticked would display 10 images which would all be the same image but when a user rollsover or clicks each image a text box would display with addtional info, which would be different for each image.
Hope I am explaining this clearly