#html
<a href=”#tr1″ class=”Tableslide”>
<table border=”0″ width=”100%”>
<tr>
<td>
<samp>連結</samp>
</td>
<td ID=”img_title_ar” Class=”title_ar1″ >
</td>
</tr>
</table>
</a>
<div id=”tr2″>
…
</div>
#js
$(“.Tableslide”).click(function() {
var _this = $(this).attr(“href”);
if ($(_this).css(“display”) == “none”) {
$(_this).slideDown();
//$(this).html(“-“);
document.getElementById(“img_title_ar”).className = “title_ar1”;
} else {
$(_this).slideUp();
//$(this).html(“+”);
document.getElementById(“img_title_ar”).className = “title_ar2”;
}
$(“#msg”).html($(_this).css(“display”));
return false;
});
#css
.title_ar1
{
background: url(‘../images/title_arup.gif’);
}
.title_ar2
{
background: url(‘../images/title_ardw.gif’);
}