Skip to content

Commit

Permalink
convert coffeescript file to plain old javascript
Browse files Browse the repository at this point in the history
  • Loading branch information
koddsson committed May 22, 2020
1 parent 42a853c commit 15610f1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
15 changes: 15 additions & 0 deletions app/assets/javascripts/subscriptions-toggle.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Expand/collapse toggling for coach/student group subscriptions.
// Used in the new user signup flow, to stop too many options being
// presented.

/* global $ */

$(() =>
$(".subscriptions .toggle").click(function (e) {
const $section = $(e.target).closest(".subscriptions");
const $container = $(".group-container", $section);
const $icon = $(".toggle i", $section);
$container.slideToggle(400, () => $container.toggleClass("collapsed"));
$icon.toggleClass("fa-chevron-right fa-chevron-down");
})
);
12 changes: 0 additions & 12 deletions app/assets/javascripts/subscriptions-toggle.js.coffee

This file was deleted.

0 comments on commit 15610f1

Please sign in to comment.