How to Hide and Show Div Class using Dropdownlist

I have this form as show below

7681

dropdown-criteria.PNG

Controller




public function actionIndex()

{

    $model = new Programme();       

    $model->scenario = 'import-programme';


    return $this->render('index', [

        'model' => $model,

    ]);

}



View




<?php $form = ActiveForm::begin([

	'id' => 'import-programme',

	'enableAjaxValidation' => false,

	'options' => ['enctype' => 'multipart/form-data'],

]); ?>


<!---Start Select Programme Select Criteria--->

<div class="box-info box box-solid view-item col-xs-12 col-lg-12 no-padding">

    <div class="box-header with-border">

	<h3 class="box-title"><i class="fa fa-search"></i> <?php echo Yii::t('app', 'Select Criteria'); ?></h3>

    </div>

    <div class="box-body no-padding">

        

        

    	<div class="col-xs-12 col-sm-6 col-lg-6">

            <?= $form->field($model, 'state_office_id')->widget(Select2::classname(), [

                'data' => ArrayHelper::map(\common\models\StateOffice::find()->where(['is_status' => 0])->all(),'id','state_name'),

                'language' => 'en',

                'options' => ['placeholder' => '--- Select State Office ---', 

                    'onchange'=>'

                        $.get( "'.Url::toRoute('dependent/getstudycentre').'", { id: $(this).val() } )

                            .done(function( data ) {

                                $( "#'.Html::getInputId($model, 'study_centre_id').'" ).html( data );

                            }

                        );' 

                ],

             //   'disabled'=>'true',

                'pluginOptions' => [

                    'allowClear' => true

                ],

            ]); ?>                            


        </div>

        <div class="col-xs-12 col-sm-6 col-lg-6">

            <?= $form->field($model, 'study_centre_id')->widget(Select2::classname(), [

            'data' => ArrayHelper::map(\common\models\StudyCentre::findAll(['state_office_id' => $model->state_office_id]),'id','study_centre_name'),

                'language' => 'en',

                'options' => ['placeholder' => '--- Select Study Centre ---'],

                'pluginOptions' => [

                    'allowClear' => true

                ],

            ]); ?>                              

    	</div>         

    </div>  

</div>  



When study centre Dropdownlist is onchange, when no value is selected, the search criteria should hide. But when a value is selected, is should show. The search criteria should hide by default.