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

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

- Page: https://pluginprobe.com/plugins/copy-the-code/4.0.2/code/classes/elementor/widgets/deal/script.js
- Raw: https://pluginprobe.com/plugins/copy-the-code/4.0.2/raw/classes/elementor/widgets/deal/script.js
- Modified: 2024-10-10T19:27:48+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/4.0.2/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 );

```
