Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(function() {
- var request;
- $(document).on({
- mouseenter: function() {
- pos = $(this).offset();
- request = $.post('inc/info.php', {
- inf: $(this).attr('id')
- }, function(data) {
- $('#infopop').html(data);
- $('#infopop').css('left', pos.left);
- $('#infopop').css('top', pos.top + 20);
- $('#infopop').show();
- });
- },
- mouseleave: function() {
- $('#infopop').hide();
- request.abort();
- }
- }, '.inf');
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement