Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(function() {
- // Check if it is iOS
- var isiOS = (navigator.userAgent.match(/(iPad|iPhone|iPod)/g) ? true : false);
- if(isiOS === true) {
- // Store -webkit-tap-highlight-color as this gets set to rgba(0, 0, 0, 0) in the next part of the code
- var tempCSS = $('a').css('-webkit-tap-highlight-color');
- $('body').css('cursor', 'pointer') // Make iOS honour the click event on body
- .css('-webkit-tap-highlight-color', 'rgba(0, 0, 0, 0)'); // Stops content flashing when body is clicked
- // Re-apply cached CSS
- $('a').css('-webkit-tap-highlight-color', tempCSS);
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement