1
I have a div, which contains a text inside, when I pass the mouse over it, another div, which is a small bar of height:3px
, no longer be display:none
and it gets display:block
, So far quiet, everything’s working.
However, I would like the width of this bar to be equal to the size of the div I hovered over.
For example:
<div>PALAVRA</div>
<div class="barra" style="display:none"></div>
My Jquery is correct:
$( ".internaMenu:eq(0)" ).hover(function() {
$( this ).find('.internaMenuBarra').css({'display':'block','width':'85px'});
},
function() {
$( this ).find('.internaMenuBarra').css('display','none');
});
I set size in Jquery just to take a test.
It worked perfectly. Exactly what I expected. Thank you very much.
– Felipe Viero Goulart