# copy-the-code/3.8.0/classes/elementor/widgets/deal/script.js

Copy Anything to Clipboard for WordPress – Copy Button, Copy Text &amp; Copy Code, version 3.8.0. 40 lines.

- Page: https://pluginprobe.com/plugins/copy-the-code/3.8.0/code/classes/elementor/widgets/deal/script.js
- Raw: https://pluginprobe.com/plugins/copy-the-code/3.8.0/raw/classes/elementor/widgets/deal/script.js
- Modified: 2023-10-28T18:56:20+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/copy-the-code/3.8.0/code/classes/elementor/widgets/deal/script.js#L10-L20`.

```javascript
(function ($) {
    const CTCDeal = {

        /**
         * Init
         */
        init: function () {
            this._bind();
        },

        /**
         * Binds events
         */
        _bind: function () {
            $( document ).on( 'click', '.ctc-deal-toggle-link', this.toggleDetails );
        },

        /**
         * Toggle Details
         */
        toggleDetails: function (event) {
            event.preventDefault();

            const self = $( this )
            const deal = self.parents( '.ctc-deal' )
            const details = deal.find( '.ctc-toggle-details' )

            details.slideToggle( 'fast' )
            
        }
    };

    /**
     * Initialization
     */
    $(function () {
        CTCDeal.init();
    });

})(jQuery);
```
