[/code]this is my code
[code] $this->registerJs(
'$("document").ready(function(){
$("#userprofile").hide();
$("#booking").show();
$("#edit").hide();
$("#fanclub").hide();
$("#remove").hide();
$(".nav a").on("click", function(){
$(".nav").find(".active").removeClass("active");
$(this).parent().addClass("active");
});
...
$("#remove-button").click(function(){
$("#userprofile").hide();
$("#booking").hide();
$("#edit").hide();
$("#fanclub").show();
$("#remove").show();
});
<div id="fanclub">
<div class="col-md-6">
<?php $form = ActiveForm::begin();?>
...
<?= Html::submitButton(Yii::t('app', 'Join'),
['class' =>'btn btn-success','id'=>'remove-button']) ?>
<?php ActiveForm::end();
}?>
</div>
</div>
<div id="remove">
<div class="col-md-6">
......
<i class="fa fa-times-circle-o fa-2x" id="remove-fan"></i></a>
</div>
</div>
what i want is when i click on the submit button(id:remove-button) display two div’s ‘remove’ and ‘fanclub’. but i get the ‘booking’ div(the one set to show on document.ready) what should i do to display ‘fanclub’ and ‘remove’
when i click the submit button with id ‘remove-button’?
i tried the following also
$("#remove-button").click(function(){
$("#userprofile").hide();
$("#booking").hide();
$("#edit").hide();
$("#fanclub").show();
$("#remove").show();
return false;
});
and also like this
$("#remove-button").click(function(e){
$("#userprofile").hide();
$("#booking").hide();
$("#edit").hide();
$("#fanclub").show();
$("#remove").show();
e.preventDefault();
});
but it caused my button to become nonclickable.(nothing happens when button is clicked)