I need a way to hide the 'sample' div when hovering over it and then show it again when the mouse moves away
$('.secmenu').hover(function() {
$('.sample').css('opacity', '0');
if ($('.secmenu').mouseleave()) {
$('.sample').css('opacity', '1');
}
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<a href="" class="secmenu">click</a>
<div class="sample">
hello div sample text content hello div sample text content
</div>