0

Ok I want to create a Profilecard aka tooltip simiar to how twitter uses when you hover over a user's name. This will be on a timeline similar to twitter or Facebook. A container appears with a pic, background pic and users info. I only want to create one container in my html code and fill that container with users' info using php every time you hover over that user's name. The key here is only creating one html element to reuse over and over, then using css absolute position with a top margin and left margin to position the Profile card under the user's name. Of course I will be doing this using Jquery along with ajax loading the users info.

My problem and question is how do I tell Jquery what my top margin should be, since each user's name will be a different length away from top of the timeline.

Profilecard aka tooltip example

Luna
  • 537
  • 1
  • 12
  • 26
  • Please share your code so we could examine the problem properly. – Aziz Sep 13 '16 at 21:50
  • This could be useful for you: http://stackoverflow.com/questions/3714628/jquery-get-the-location-of-an-element-relative-to-window – yuriy636 Sep 13 '16 at 22:40

0 Answers0