I'm trying to have a button clicked `onload` of a page, for a default event,
but neither `click()` nor `trigger("click")` seem to be working.

Here is a sample: 

<https://jsfiddle.net/kneidels/Lras6fcy/>

```js
$("#getAttendanceRep").click();

$("#getAttendanceRep").click(function() {
  alert('clicked');
});
```

```html
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<input class="datepicker form-control" value="2/2/2019" name="date" id="date">
<input type="button" id="getAttendanceRep" value="Display Slots" class="btn" />
```

What am I getting wrong?

Thanks!