You would simply need to duplicate the script and div arrangement and then substitute in unique IDs;
Code:
<html>
<head>
<title>Spoiler Test</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function()
{
$('#pre-spoiler').toggle(
function()
{
$('#spoiler').slideDown();
$('#button-img').attr('src','images/button-clicked.jpg');
},
function()
{
$('#spoiler').slideUp();
$('#button-img').attr('src','images/button.jpg');
});
$('#pre-spoiler2').toggle(
function()
{
$('#spoiler2').slideDown();
$('#button-img2').attr('src','images/button2-clicked.jpg');
},
function()
{
$('#spoiler2').slideUp();
$('#button-img2').attr('src','images/button2.jpg');
});
});
</script>
</head>
<body>
<div id="pre-spoiler">
<img src="images/button.jpg" id="button-img"/>
</div>
<div id="spoiler" style="display:none;">
<a href="IMAGEURL" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" onclick="window.open('IMAGEURL','_blank','toolbar=0, location=0, top=5, left=50, directories=0, status=0, scrollbars=0, resizable=1, copyhistory=0, menuBar=0, width=x, height=y');return(false)"><img alt="" border="0" id="name" src="IMAGEURL_SMALL" width="400" /></a>
...more content...
</div>
<div id="pre-spoiler2">
<img src="images/button2.jpg" id="button-img2"/>
</div>
<div id="spoiler2" style="display:none;">
<a href="IMAGEURL" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" onclick="window.open('IMAGEURL','_blank','toolbar=0, location=0, top=5, left=50, directories=0, status=0, scrollbars=0, resizable=1, copyhistory=0, menuBar=0, width=x, height=y');return(false)"><img alt="" border="0" id="name" src="IMAGEURL_SMALL" width="400" /></a>
...more content...
</div>
</body>
</html>
Just follow the same pattern for a 3rd button/div.
Bookmarks