<script>
$(document).ready(function () {
$(".box").hover(
function () {
$(this).addClass("box-hover");
},
function () {
$(this).removeClass("box-hover");
}
);
});
</script>
/* example: your html code is like this:
<h2 class="firstname">Firstname </h2>
<p class="secondname">Secondname </p>
/*
h2.firstname:hover {
background-color: yellow;
}
p.secondname:hover {
background-color: blue;
}
Code Example |
---|
Html :: Html.Raw blazor |
Html :: mdb input bg |
Html :: bold in bootstrap |
Html :: html select default |
Html :: ngfor index |
Html :: add favicon to website html |
Html :: link email |
Html :: og html |
Html :: Ion-img in center of screen |
Html :: checked bootstrap 5 |
Html :: spawn mob without ai |
Html :: align image/text |
Html :: textbox dropdown with manual input |
Html :: html option selected |
Html :: html paragraph background color |
Html :: input without autocomplete |
Html :: clear html screen |
Html :: onclick open new url html |
Html :: m3u8 ffmpeg download |
Html :: accept function jsf component |
Html :: ng build index html not working |
Html :: html dropdown |
Html :: ol list |
Html :: test image as base 64 string |
Html :: google logo link |
Html :: read only attribute in html |
Html :: not allow decimal in input type number |
Html :: select |
Html :: auto refresh |
Html :: onclick hide div javascript |