その他の操作
編集の要約なし |
編集の要約なし |
||
| 1行目: | 1行目: | ||
$(function(){ | $(function(){ | ||
//spoiler block behavior | |||
$('.spoiler').click(function(){ | |||
$(this).toggleClass('off'); | |||
$ | |||
}); | }); | ||
// spoiler button behavior | |||
$('#spoilerbtn').text('Show all spoilers'); | |||
$('#spoilerbtn').click(function(){ | |||
$(this).toggleClass('hide'); | |||
$('.spoiler').toggleClass('showall'); | |||
if ($(this).is('.hide')){ $(this).text('Hide all spoilers'); } | |||
else { $(this).text('Show all spoilers'); } | |||
}); | |||
}); | }); | ||
2025年1月12日 (日) 00:07時点における版
$(function(){
//spoiler block behavior
$('.spoiler').click(function(){
$(this).toggleClass('off');
});
// spoiler button behavior
$('#spoilerbtn').text('Show all spoilers');
$('#spoilerbtn').click(function(){
$(this).toggleClass('hide');
$('.spoiler').toggleClass('showall');
if ($(this).is('.hide')){ $(this).text('Hide all spoilers'); }
else { $(this).text('Show all spoilers'); }
});
});