I've managed to show <div> which contains a relevant image to the table row, but I want my <div> to appear next to the clicked row like this:

In this example, when user clicks on second row, <div> is shown right next to it. So, how do I get position of clicked row? 
I tried this and this solutions, but they both return the table's position instead of row's.
 
     
    