Skip to content

Commit

Permalink
Update the donation collapse to only affect the one that was clicked on
Browse files Browse the repository at this point in the history
  • Loading branch information
VitalikL committed Apr 18, 2024
1 parent 3ddb48e commit 9b8ec0e
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions js/ss-reader.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,12 +225,14 @@ $(function(){
});

$("div.ss-donation-appeal-title").click(function (){
if ($(".ss-donation-appeal-text").is(":visible")) {
$(".ss-donation-appeal-title").removeClass("ss-donation-appeal-title-expanded");
$(".ss-donation-appeal-text").hide();
var content = $(this).parent().find(".ss-donation-appeal-text")

if (content.is(":visible")) {
$(this).removeClass("ss-donation-appeal-title-expanded");
content.hide();
} else {
$(".ss-donation-appeal-title").addClass("ss-donation-appeal-title-expanded");
$(".ss-donation-appeal-text").show();
$(this).addClass("ss-donation-appeal-title-expanded");
content.show();
}
});

Expand Down

0 comments on commit 9b8ec0e

Please sign in to comment.