Completed
Push — master ( 4ba1a0...a9ffaa )
by Sudar
10:49 queued 12s
created

$(document).ready   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 15

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
nc 2
nop 0
dl 0
loc 15
rs 9.4285
c 0
b 0
f 0
1
/**
2
 * Show/Hide individual add-on license key input.
3
 */
4
( function( $ ) {
5
	$( document ).ready( function() {
6
		$( '.el-addon .el-expander' ).on( 'click', function() {
7
			var $this = $( this );
8
9
			$this.parent().find( '.individual-license' ).toggle();
10
11
			if ( $this.hasClass( 'dashicons-arrow-down' ) ) {
12
				$this
13
					.removeClass( 'dashicons-arrow-down' )
14
					.addClass( 'dashicons-arrow-up' );
15
			} else {
16
				$this
17
					.removeClass( 'dashicons-arrow-up' )
18
					.addClass( 'dashicons-arrow-down' );
19
			}
20
		} );
21
	} );
22
} )(jQuery);
23