```js
$button.click(function (e) {
  e.preventDefault();
```

And just make the `href="#"`. `javascript:void(0);` is overkill since we're creating it in JS anyway.