Doing a hovering event on button as below.
<div id="common_id">
<div class="button" id="make_larger">
<button type="button">Large</button>
</div>
<div class="button" id="make_small">
<button type="button">Smaller</button>
</div>
<div class="button" id="make_normal">
<button type="button">Normal</button>
</div>
</div>
JQuery code is:
$('#common_id .button').hover(function () {
$(this).addClass('hover1');
}, function () {
$(this).removeClass('hover1');
});
Css is:
.hover1 {
background-color:Black;
position:relative;
}
When placing mouse over buttons ,the complete row(From starting to end of page) is getting black even button is not getting black but its background is seems to be black along that row. i want the button to be black when i hover on it. Why it is not working?
Thanks in advance.