Make div appear on Hover
General Discussion
2
Posts
2
Posters
178
Views
-
Hello, I was trying to make a text appear when I hover on a picture, I could achieve that by using the JS code:
<script>
jQuery(document).on("mouseenter", ".hoverme", function(event) {
jQuery(".showme").show();
});
jQuery(document).on("mouseleave", ".hoverme", function(event) {
jQuery(".showme").hide();
});
</script>it works fine but the only problem is that the element with class .showme is visible when I load the page, then If I hover the other element and take off the mouse it disappear.
how can I make the element "showme" invisible when I first load the page?
thank you! -
Dear @beshepappà
you can use CSS classes to hide and remove the elements.Or call the function to hide ALL before you click.
Best!
Marius
Online Users
Forgot your key, lost your files, need a previous Lay Theme or Addon version?
Go to www.laykeymanager.com