-1
Good afternoon, I am developing a site for access to videos about disciplines, I want to make when selecting a discipline appear the buttons of the image below.
Next to this select, I made two buttons that should appear after selecting a course:
I realized this way of "hiding" as follows:
$(document).ready(function () {
$("#disciplina_prof").change(function () {
if($("#disciplina_prof").val() == ""){
$('#seus_videos').hide();
} else {
$('#seus_videos').show();
}
});
});
However when reloading the page the buttons still appear.
Taking into account that "Select a discipline" has value "";
HTML:
<div class="container">
<div class="row about-container">
<div class="col-md-4">
<div class="page-header clearfix">
<h2 class="pull-left">Selecione sua diciplina:</h2>
<div class="box">
<select name="disciplina_prof" id="disciplina_prof">
<option value="" selected=selected>Selecione uma disciplina</option>
<?php
if($num_logar > 0) {
do {
echo "<option value='".$fet_logar['disciplina_id']."'>".$fet_logar['disciplina_nome']."</option>";
}while($fet_logar = mysqli_fetch_assoc($exe_logar));
}
?>
</select>
</div>
</div>
</div>
<div class="col-md-4 offset-md-4">
<div id="seus_videos">
<div class="page-header clearfix">
<h2 class="pull-left">Seus vídeos:</h2>
</div>
<button type="button" class="btn btn-secondary btn-sm">Videos aprovados</button>
<button type="button" id="video_pendente" class="btn btn-secondary btn-sm">Videos pendentes</button>
</div>
</div>
</div>
</div>
Please could post part of the HTML?
– Thomas Erich Pimentel
Ready @Thomaserichpimentel
– Matheus