Passed
Push — 262-fix/delete-sticky-posts ( 13b51e...ba9b70 )
by Rajan
09:05
created

assets/js/src/delete-posts-by-sticky-post.js   A

Complexity

Total Complexity 3
Complexity/F 1.5

Size

Lines of Code 14
Function Count 2

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 0
nc 1
dl 0
loc 14
rs 10
c 2
b 0
f 0
wmc 3
mnd 1
bc 4
fnc 2
bpm 2
cpm 1.5
noi 0
1
/**
2
 * Add select2 functionality..
3
 */
4
jQuery( document ).ready( function () {
5
	
6
	jQuery( '.sticky_force_delete' ).hide();
7
8
	jQuery("input[name='smbd_sticky_post_sticky_option']").change(function(){
9
		var sticky_option = jQuery("input[name='smbd_sticky_post_sticky_option']:checked").val();
10
		if( sticky_option == "show" ){
11
			jQuery( '.sticky_force_delete' ).show();
12
		}else{
13
			jQuery( '.sticky_force_delete' ).hide();
14
		}
15
	});
16
17
} );