Skip to content
This repository was archived by the owner on Nov 25, 2024. It is now read-only.

Commit 352c097

Browse files
committed
fixed heart button
1 parent f1e60a4 commit 352c097

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

app/javascript/packs/application.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,11 @@ $(document).on('ready turbolinks:load', function () {
2020
event.preventDefault();
2121

2222
var el = $(this);
23+
el.toggleClass('is-active');
2324

2425
$.get(el.attr('href'))
25-
.done(function(data) {
26-
el.toggleClass('is-active');
27-
})
2826
.fail(function() {
27+
el.toggleClass('is-active');
2928
alert("error");
3029
})
3130
;

0 commit comments

Comments
 (0)