-
-
Save chiroleen/6159890015f86e1c681bae6c9c0e34a2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// カテゴリ、月別アーカイブの表示に関する関数(jQuery利用) | |
// @link https://api.jquery.com/ready/ | |
jq2 = jQuery.noConflict(); | |
jq2(function ($) { | |
$(".archive-list >li").click(function () { | |
if ($(this).next(".month-archive-list").is(":visible") || $(this).hasClass("acv_open")) { //既に開いている場所なら | |
$(".month-archive-list", this).slideUp("fast"); //閉じる | |
$(this).removeClass("acv_open"); | |
} | |
else { //閉じている場所なら | |
$(this).siblings().children(".month-archive-list").slideUp("fast"); //その他、閉じる | |
$(".month-archive-list", this).slideDown("fast"); //開く | |
$(".year").removeClass("acv_open"); //.acv_open削除 | |
$(this).addClass("acv_open"); //.acv_open付加 | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment