chrome_extension/js/hover.js
/**
 * This function positions the hover div based on the location of the link
 * it is attached to.
 *
 * @argument {object} element The element used to decide the placement of the
 * hover div.
 **/
This function positions the hover div based on the location of the link
it is attached to.

@argument {object} element The element used to decide the placement of the
hover div.
This function positions the hover div based on the location of the link it is attached to . @argument { object } element The element used to decide the placement of the hover div .
function positionHover(element) {
  var position = $(element).offset();
  $('#reddit-hover').css('left', position.left);
  $('#reddit-hover').css('top', position.top + $(element).height() + 2);
}
function positionHover ( element ) { var position = $ ( element ) . offset ( ) ; $ ( '#reddit-hover' ) . css ( 'left' , position . left ) ; $ ( '#reddit-hover' ) . css ( 'top' , position . top + $ ( element ) . height ( ) + 2 ) ; }
This function positions the hover div based on the location of the link
 it is attached to.
This function positions the hover div based on the location of the link it is attached to .