Jump to content

Profile when Mouse Over


samuvk

Recommended Posts

Hi,

How can I do something like display a profile while mouseover an item? Either in HTML or JavaScript.

 

I have the following:

<a href="#" onmouseover="showDetails()" onmouseout="hideDetails()">John</a>

How could I building the profile itself? Developing the showDetail() function do display:

 

Thank you very much

 

See images attached

post-189516-0-03764800-1444421222_thumb.png

post-189516-0-59578000-1444421222_thumb.png

Link to comment
Share on other sites

You don't need JavaScript, this can be done using css only.

 

create profile details container with content give it position: absolute; display: none; and place in anchor element, give anchor element position: relative; then use :hover to change child div to display: block;

 

You then just need to add top: left: properties to position it where you like relative to the anchor element.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...