Guest User

Untitled

a guest
Sep 23rd, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. $(':text').focusin(function() {
  2. var a = $(this).offset().top + $(this).outerHeight(),
  3. b = $(this).offset().left;
  4. $('.description').offset({top: a, left: b}).fadeIn(400);
  5. });
  6. $(':text').focusout(function() {
  7. $('.description').css('display','none');
  8. // $('.description').removeAttr('style');
  9. $('.description').css({'left' : '0', 'top':'0'});
  10.  
  11. });
  12.  
  13. $(':text').focusin(function() {
  14. var a = $(this).offset().top + $(this).outerHeight(),
  15. b = $(this).offset().left;
  16.  
  17. $('.description').css({'top': a, 'left': b}).fadeIn(400);
  18.  
  19. });
  20. $(':text').focusout(function() {
  21. $('.description').css('display','none');
  22. });
Add Comment
Please, Sign In to add comment