1 2$(document).ready(function() { 3if(/(iPhone|iPod|iPad)/i.test(navigator.userAgent)) { 4 if(/OS [2-4]_\d(_\d)? like Mac OS X/i.test(navigator.userAgent)) { 5 // iOS 2-4 so Do Something 6 // alert('ios[2-4]'); 7 $('#toppanel').removeClass('ios5'); 8 $('#toppanel').addClass('ios4'); 9 10 $('.sk-container').on('touchstart', function(){ 11 $('#toppanel').css('visibility', 'hidden'); 12 }); 13 14 15 var $myFixedDiv = $('#toppanel'); 16 var iFixedDivHeight = $myFixedDiv.outerHeight({ 'margin': true }); 17 18 $(window).scroll(function() { 19 var iWindowHeight = $(window).height(); 20 var iScrollPosition = $(document).scrollTop(); // or document.body.scrollTop 21 //$myFixedDiv.css({ 'top': iWindowHeight + iScrollPosition - iFixedDivHeight + 60}); 22 $myFixedDiv.css({ 'bottom': 0 - iScrollPosition - iFixedDivHeight - 20}); 23 24 }); 25 26 27 $('.sk-container').on('touchend', function(){ 28 $('#toppanel').css('visibility', 'visible'); 29 }); 30 31 32 } else if(/CPU like Mac OS X/i.test(navigator.userAgent)) { 33 // iOS 1 so Do Something 34 35 } else { 36 // iOS 5 or Newer so Do Nothing 37 38 } 39} 40 41// Expand Panel 42 $("#open").click(function(){ 43 $("div#panel").slideDown("slow"); 44 45 }); 46 47 // Collapse Panel 48 $("#close").click(function(){ 49 $("div#panel").slideUp("slow"); 50 }); 51 52 // Switch buttons from "Log In | Register" to "Close Panel" on click 53 $("#toggle label").click(function () { 54 $("#toggle label").toggle(); 55 }); 56 57}); 58
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.