I'm working on responsive design. I was struck with the issue, where the input field which has read only attribute, I want to disable the keypad in safari browser. The code I used was,
Through the above code I'm able to get the desired output, but it is failing for the first time.
Any suggestions how to handle this issue.
Thanks in advance
Code:
var currentscroll = 0; $('input, textarea').bind('focus',function() { currentscroll = $(window).scrollTop(); }); $('input, textarea').bind('blur',function({ if(currentscroll != $(window).scrollTop()) { $(window).scrollTop(currentscroll); } });
Any suggestions how to handle this issue.
Thanks in advance