1jQuery(document).ready(function() { 2 3 if(detectIEEdge()) { 4 console.log("ie" + detectIEEdge()); 5 var textBox = jQuery('.frm input[type="text"]'); 6 textBox.each(function() { 7 var self = jQuery(this); 8 self.val(self.attr('placeholder')); 9 }); 10 11 jQuery('input[type="text"]').on('focus', textBox, function() { 12 var self = jQuery(this); 13 if(self.val() == self.attr('placeholder')) { 14 self.val(''); 15 } 16 }); 17 jQuery('input[type="text"]').on('blur', textBox, function() { 18 var self = jQuery(this); 19 if(self.val() == '') { 20 self.val(self.attr('placeholder')); 21 } 22 }); 23 }; 24 25 function detectIEEdge() { 26 var ua = window.navigator.userAgent; 27 28 var msie = ua.indexOf('MSIE '); 29 if (msie > 0) { 30 // IE 10 or older => return version number 31 return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10); 32 } 33 34 var trident = ua.indexOf('Trident/'); 35 if (trident > 0) { 36 // IE 11 => return version number 37 var rv = ua.indexOf('rv:'); 38 return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10); 39 } 40 41 var edge = ua.indexOf('Edge/'); 42 if (edge > 0) { 43 // Edge => return version number 44 return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10); 45 } 46 47 // other browser 48 return false; 49 } 50 51});
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.