Located within the content div is the first div known as the '#icon-selection-menu' bar. Its default position is set to absolute with top:0px
and left:0px
, causing it to appear in the top left corner of the content div.
Further down within the children of the content div, there are other divs referred to as '.emoticon-button'. These buttons have a relative position within their parent container. When one of these buttons is clicked, I want to reposition the first div just above the button, adjusting its bottom border to align with the top border of the button.
How can I determine the top and left values needed to adjust $('#icon-selection-menu').top
and $('#icon-selection-menu').left
accordingly?