hugosslade

Floating header on touch devices with virtual keyboard

Dec 9th, 2013
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $(function(){
  2. $("input, textarea").on({
  3.     'focus' : function(e){
  4.         $("#header").css({"position":"absolute"});
  5.     },
  6.     "blur" : function(e){
  7.         $("#header").css({"position":"fixed"});
  8.     }
  9. });
  10. })
Advertisement
Add Comment
Please, Sign In to add comment