Your IP : 216.73.216.220


Current Path : /proc/thread-self/cwd/static/frontend/Magento/autumnus/it_IT/Magento_Weee/js/
Upload File :
Current File : //proc/thread-self/cwd/static/frontend/Magento/autumnus/it_IT/Magento_Weee/js/tax-toggle.js

/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

define([
    'jquery'
], function ($) {
    'use strict';

    /**
     * @param {Object} config
     * @param {jQuery.Event} e
     */
    function onToggle(config, e) {
        var elem = $(e.currentTarget),
            expandedClassName = config.expandedClassName || 'cart-tax-total-expanded';

        elem.toggleClass(expandedClassName);

        $(config.itemTaxId).toggle();
    }

    return function (data, el) {
        $(el).on('click', onToggle.bind(null, data));
    };
});