Struggling to implement a simple hide and reveal effect in my JavaScript learning journey. Currently, the effect is only cancelled by clicking on another div with the same reference.
Take a look at my JavaScript code:
var $ = jQuery;
$(document).ready(function(){
$('.section').hide();
});
function showMe(num){
$('.section').hide(0);
$('#div_one'+num).fadeIn(1000);
}
Reviewing my CSS:
.height-auto
{
height:auto;
}
.section
{
width:552px;
min-height:300px;
}
Check out my HTML:
<div class="section home-things visible" id="div_one1">
<div class="section-contents"></div>
</div>
Ideally, I want "javascript:showMe(1)" to toggle "div_one1" and so forth.
Please lend me a hand.