HTML:
<a href="javascript:void(0);" title="Show and Hide" id="_showhide">
<span id="textsh">hide</span>
<div id="contentsShowHide" style="display:none;">
Contents here
<div>
JavaScript:
function headerShowHide(){
$(document).ready(function(){
$('#_showhide').click(function(){
$('#contentsShowHide').toggle(function(){$("#textsh").text("show")},function(){$("#textsh").text("hide")});
});
});}
<div id="contentsShowHide">
は表示も非表示もされず、 のテキストは変更されません
<span id="textsh">
。ここで何が欠けていますか?