I want to change the color of my Bulma button, in my Rails app. Those button are use to filter results on a search page.
So far i did the following, but it is not working the color is not changing:
<%= link_to request.params.merge(category: "9"), class: "button is-rounded", id: "ButtonId" do %>
<i class="fas fa-thermometer-full"></i><%= t "services.title" %>
<% end %>
<script>
$('#ButtonId').click(function() {
$(this).addClass('has-background-danger');
});
</script>