I have a section in which on hover on a parent div I want to display a children div (element) , so here is
JSFIDDLE:live demo
Here is HTML
<div class="flex-container">
<div class="box">1
<span class="box-children">Children Div</span>
</div>
<div class="box">2
<span class="box-children">Children Div</span>
</div>
<div class="box">3
<span class="box-children">Children Div</span>
</div>
<div class="box">4
<span class="box-children">Children Div</span>
</div>
<div class="box">5
<span class="box-children">Children Div</span>
</div>
<div class="box">6
<span class="box-children">Children Div</span>
</div>
</div>
Here is JS
$(document).ready(function() {
console.log('init')
$('.box').hover(function(){
$('.box-children').addClass('open');
},
function(){
$('.box-children').removeClass('open');
});
});
EXPECTED:
On the hover parent element, it should display the children element
Unfortunately now on hover, it displays all children element

$('.box-children',this)->thisrefers to the.boxyou have clicked on and that will search for.box-childreninsidethis