function openSubCategory(node_id,role){

    // RESET ADVERTISMENT LIST , filter box, img and urgent and scroll bar
    resetParametr();

    condition = [];
    var object = {};
    object.key = 'category';
    object.value = node_id;
    condition.push(object);

    // CHANGE NODE LIST
    if (role === 'parent')
    {
        $.ajax({
            url:'/Api/Desktop/nodeList',
            method:'post',
            data:{id:node_id},
            dataType:'json',
            success:function (data) {

                if(data['category']!=='')
                {
                    $('#category_descktop').html(data['category']);


                }
                else
                {
                    $('#category_descktop').html('');
                }

                if (data['blog']!=='')
                {
                    $('#blog_view').html(data['blog']);
                }
                else
                {
                    $('#blog_view').html('');
                }
            }
        });
    }
    else
    {
        $('.selected').removeClass('border-danger selected');
        $(role).addClass('selected border-danger');
    }

    // CHANGE FILTER
    $.ajax({
        url:'/Api/Desktop/changeCategory',
        method:'post',
        data:{id:node_id},
        success:function (data) {
            if(data!=='')
            {
                $('#custom_id').html(data);
            }
            else
            {
                $('#custom_id').html('');
            }
        }
    });

    // LOAD DATA
    load_data();

    loadSubCategoryName(node_id);
}
// CHANGE CATEGORY TO CHANGE CUSTOM FILTER
CHANGE CATEGORY TO CHANGE CUSTOM FILTER
CHANGE CATEGORY TO CHANGE CUSTOM FILTER
function openSubCategory(node_id,role){
    resetParametr();
    condition = [];
    var object = {};
    object.key = 'category';
    object.value = node_id;
    condition.push(object);
    if (role === 'parent')
    {
        $.ajax({
            url:'/Api/Desktop/nodeList',
            method:'post',
            data:{id:node_id},
            dataType:'json',
            success:function (data) {
                if(data['category']!=='')
                {
                    $('#category_descktop').html(data['category']);
                }
                else
                {
                    $('#category_descktop').html('');
                }
                if (data['blog']!=='')
                {
                    $('#blog_view').html(data['blog']);
                }
                else
                {
                    $('#blog_view').html('');
                }
            }
        });
    }
    else
    {
        $('.selected').removeClass('border-danger selected');
        $(role).addClass('selected border-danger');
    }
    $.ajax({
        url:'/Api/Desktop/changeCategory',
        method:'post',
        data:{id:node_id},
        success:function (data) {
            if(data!=='')
            {
                $('#custom_id').html(data);
            }
            else
            {
                $('#custom_id').html('');
            }
        }
    });
    load_data();
    loadSubCategoryName(node_id);
}
function openSubCategory ( node_id , role ) { resetParametr ( ) ; condition = [ ] ; var object = { } ; object . key = 'category' ; object . value = node_id ; condition . push ( object ) ; if ( role === 'parent' ) { $ . ajax ( { url : '/Api/Desktop/nodeList' , method : 'post' , data : { id : node_id } , dataType : 'json' , success : function ( data ) { if ( data [ 'category' ] !== '' ) { $ ( '#category_descktop' ) . html ( data [ 'category' ] ) ; } else { $ ( '#category_descktop' ) . html ( '' ) ; } if ( data [ 'blog' ] !== '' ) { $ ( '#blog_view' ) . html ( data [ 'blog' ] ) ; } else { $ ( '#blog_view' ) . html ( '' ) ; } } } ) ; } else { $ ( '.selected' ) . removeClass ( 'border-danger selected' ) ; $ ( role ) . addClass ( 'selected border-danger' ) ; } $ . ajax ( { url : '/Api/Desktop/changeCategory' , method : 'post' , data : { id : node_id } , success : function ( data ) { if ( data !== '' ) { $ ( '#custom_id' ) . html ( data ) ; } else { $ ( '#custom_id' ) . html ( '' ) ; } } } ) ; load_data ( ) ; loadSubCategoryName ( node_id ) ; }
CHANGE CATEGORY TO CHANGE CUSTOM FILTER
CHANGE CATEGORY TO CHANGE CUSTOM FILTER
// RESET ADVERTISMENT LIST , filter box, img and urgent and scroll bar // CHANGE NODE LIST // CHANGE FILTER // LOAD DATA