I found other related questions but none of the answers there actually fixed my problem. The button works fine on IE, but not on Chrome. I tried removing the span element, putting the button outside any other tags, and still fires twice. This temple extends a 'base.html' file and the code is inside a 'main' element.
HTML:
<div class="jumbotron p-4">
<div class="container-fluid">
<h1 class="jumbotron-heading">{{ category.name }}</h1>
<div>
<strong id="like_count">{{ category.likes }}</strong> likes
{% if user.is_authenticated %}
<button id="like_btn" data-categoryid="{{ category.id }}" class="btn btn-primary btn-sm" type="button">
<span data-feather="thumbs-up"></span>
Like Category
</button>
{% endif %}
</div>
</div>
JQuery:
$(document).ready(function() {
$('#like_btn').click(function() {
alert('button clicked');
});
});