Question: I'm using magento 2.0.7, and what I'm trying to do is to popup the cart(the top right cart ajax minicart) when I add a product to it, Basically trigger it. I have tried to add the "showcart" class to my add to cart button classes, but if I do so, the button just opens the cart, and doesn't add the product anymore..

Answer: 
alternative solution:
check `vendor/magento/module-catalog/view/frontend/web/js/catalog-add-to-cart.js` line: 100

```
$(document).trigger('ajax:addToCart', form.data().productSku);

```

We could add a custom js file:

```
<script type="text/x-magento-init">
{
    "*": {
        "Magento_Catalog/js/view/minicart-open": {}
    }
}

```

In the js:

```
$(document).on('ajax:addToCart', function () {#code here...}

```
This above answer works but is missing the closing brace:

```
            $('[data-block="minicart"]').on('contentLoading', function (event) {
            addToCartCalls++;
            self.isLoading(true);
                $('[data-block="minicart"]').on('contentUpdated', function ()  {
                    $('[data-block="minicart"]').find('[data-role="dropdownDialog"]').dropdownDialog("open");

                setTimeout(function() {
                $('[data-block="minicart"]').find('[data-role="dropdownDialog"]').dropdownDialog("close");
                }, 4000);
            });
        });

```