function create_ticket_cng_cat(obj){

    var data = {
        'action': 'wpsp_create_tkt_cng_cat',
        'cat_id': wpspjq(obj).val(),
        'nonce' : wpspjq('#wpsp_nonce').val().trim()
    };

    wpspjq.post(wpsp_data.ajax_url, data, function(response) {

        var return_obj=JSON.parse(response);
        console.log(return_obj);

        wpspjq('.cat_depend').addClass('hidden');
        wpspjq('.cat_depend').removeClass('wpsp_require');

        if(return_obj.keys.length){

            wpspjq(return_obj.keys).each(function(k,v){
                var cust_field = wpspjq('#cust_'+v);
                var is_required = cust_field.attr('data-required');
                cust_field.removeClass('hidden');
                if( parseInt(is_required) === 1 ){
                    cust_field.addClass('wpsp_require');
                }
            });
        }

    });
}
/**
 * Create ticket category change
 * used to get category dependant fields
 */
Create ticket category change
used to get category dependant fields
Create ticket category change used to get category dependant fields
function create_ticket_cng_cat(obj){
    var data = {
        'action': 'wpsp_create_tkt_cng_cat',
        'cat_id': wpspjq(obj).val(),
        'nonce' : wpspjq('#wpsp_nonce').val().trim()
    };
    wpspjq.post(wpsp_data.ajax_url, data, function(response) {
        var return_obj=JSON.parse(response);
        console.log(return_obj);
        wpspjq('.cat_depend').addClass('hidden');
        wpspjq('.cat_depend').removeClass('wpsp_require');
        if(return_obj.keys.length){
            wpspjq(return_obj.keys).each(function(k,v){
                var cust_field = wpspjq('#cust_'+v);
                var is_required = cust_field.attr('data-required');
                cust_field.removeClass('hidden');
                if( parseInt(is_required) === 1 ){
                    cust_field.addClass('wpsp_require');
                }
            });
        }
    });
}
function create_ticket_cng_cat ( obj ) { var data = { 'action' : 'wpsp_create_tkt_cng_cat' , 'cat_id' : wpspjq ( obj ) . val ( ) , 'nonce' : wpspjq ( '#wpsp_nonce' ) . val ( ) . trim ( ) } ; wpspjq . post ( wpsp_data . ajax_url , data , function ( response ) { var return_obj = JSON . parse ( response ) ; console . log ( return_obj ) ; wpspjq ( '.cat_depend' ) . addClass ( 'hidden' ) ; wpspjq ( '.cat_depend' ) . removeClass ( 'wpsp_require' ) ; if ( return_obj . keys . length ) { wpspjq ( return_obj . keys ) . each ( function ( k , v ) { var cust_field = wpspjq ( '#cust_' + v ) ; var is_required = cust_field . attr ( 'data-required' ) ; cust_field . removeClass ( 'hidden' ) ; if ( parseInt ( is_required ) === 1 ) { cust_field . addClass ( 'wpsp_require' ) ; } } ) ; } } ) ; }
Create ticket category change
 used to get category dependant fields
Create ticket category change used to get category dependant fields