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: 
It can be done by simply modifying minicart.js file.

Navigate to `vendor/magento/Magento_Checkout/view/web/js/view/minicart.js`

Under initialize: function, you will see 

```
$('[data-block="minicart"]').on('contentLoading', function (event) {

```

Replace the function with this code.

```
$('[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);
            });
        });

```

You can change the timeout as per your requirement.

upload the file and clean cache by running the command

```
php bin/magento cache:clean

```

Cheers!
Simply you can use this code in you minicart.phtml below of your templating code. I am using this code and it working for better. you can try it. Thanks.

```
<script type="text/javascript">
    require(['jquery'], function ($) {
        $('.minicart-wrapper').on('contentLoading', function (event) {
            $('[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);
            });
        });
    });
</script>

```