Advertisement
Guest User

Untitled

a guest
Nov 27th, 2014
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(function() {
  2.     var request;
  3.     $(document).on({
  4.         mouseenter: function() {
  5.             pos = $(this).offset();
  6.             request = $.post('inc/info.php', {
  7.                 inf: $(this).attr('id')
  8.             }, function(data) {
  9.                 $('#infopop').html(data);
  10.                 $('#infopop').css('left', pos.left);
  11.                 $('#infopop').css('top', pos.top + 20);
  12.                 $('#infopop').show();
  13.             });
  14.         },
  15.         mouseleave: function() {
  16.             $('#infopop').hide();
  17.             request.abort();
  18.         }
  19.     }, '.inf');
  20. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement