1$(document).ready(function() { 2 var isiPhone = (navigator.userAgent.match(/iPhone/i) != null); 3 var attrIphone = $("#js_section").attr('data-safari'); 4 if(isiPhone) { 5 $("#js_section").attr("style", attrIphone); 6 } 7 8/* ÐÑи пÑокÑÑÑке вниз поÑвлÑеÑÑÑ ÐºÐ½Ð¾Ð¿ÐºÐ° навеÑÑ */ 9 $(window).scroll(function() { 10 if($(this).scrollTop() > 400) { 11 $('#toTop').fadeIn(); 12 } else { 13 $('#toTop').fadeOut(); 14 } 15 }); 16 $('#toTop').click(function() { 17 $('body,html').animate({scrollTop:0},800); 18 }); 19 var $menu = $("#menu"); 20 $(window).scroll(function(){ 21 if ( $(this).scrollTop() > 50 && $menu.hasClass("menu-default") ) { 22 $menu.removeClass("menu-default").addClass("menu-fixed"); 23 } else if($(this).scrollTop() <= 50 && $menu.hasClass("menu-fixed")) { 24 $menu.removeClass("menu-fixed").addClass("menu-default"); 25 } 26 }); 27 }); 28 29$(document).on('click',".js_copy2clipboard",function() { 30 var texte = $(this).attr('data-copy'); 31 copy2clipboard(texte); 32}); 33 34// ÑкÑÑÑие/оÑкÑÑÑие блока 35// пÑи нажаÑии на .js_toggle показÑваеÑÑÑ ÑлеменÑ, ÑказаннÑй в аÑÑибÑÑе 'data-elem' 36// пÑи повÑоÑном нажаÑи на .js_toggle или на лÑбой дÑÑгой ÑÐ»ÐµÐ¼ÐµÐ½Ñ - блок закÑÑваеÑÑÑ 37// иÑклÑÑение! клик на .js_float_action обÑабаÑÑваеÑÑÑ ÐºÐ°Ðº и должен, без закÑÑÑÐ¸Ñ Ð¾ÑкÑÑÑого окна 38 39$(document).on('click',".js_toggle",function(event) { 40 event.preventDefault(); 41 var elem = $(this).attr('data-elem'); 42 $(elem).toggle(); 43 //$('.js_toggle').show(); 44 $(this).toggle(); 45}); 46 47$(document).on("click",".js_float",function(){ 48 var elem = $(this).attr('data-elem'); 49 $(elem).toggle(); 50 51 $("body").on("click.float", function(event) { 52 if($(event.target).hasClass("js_float_target")) { 53 $("body").off('click.float'); 54 } else if($(event.target).hasClass("js_float_action")){ 55 }else { 56 event.stopImmediatePropagation(); 57 $("body").off('click.float'); 58 $(elem).toggle(); 59 return false; 60 } 61 }); 62}); 63//ÐºÐ¾Ð½ÐµÑ ÑкÑÑÑиÑ/оÑкÑÑÑÐ¸Ñ Ð±Ð»Ð¾ÐºÐ¾Ð² 64 65//обÑезание заголовков 66$(function() { 67 (function cropTitle() { 68 $(".list-events-title-wrapper").each(function() { 69 var $title = $(this).find("p"); 70 while ($title.height() > $(this).height()) { 71 $title.text($title.text().split(" ").slice(0, $title.text().split(" ").length - 1).join(" ") + "..."); 72 } 73 }); 74 })(); 75}); 76 77//ÐºÐ¾Ð½ÐµÑ Ð¾Ð±ÑÐµÐ·Ð°Ð½Ð¸Ñ Ð·Ð°Ð³Ð¾Ð»Ð¾Ð²ÐºÐ¾Ð² 78 79function copy2clipboard(txt) { 80 txt = document.createTextNode(txt); 81 var m = document; 82 var w = window; 83 var b = m.body; 84 b.appendChild(txt); 85 86 if (b.createTextRange) { 87 var d = b.createTextRange(); 88 d.moveToElementText(txt); 89 d.select(); 90 m.execCommand('copy'); 91 } else { 92 var d = m.createRange(); 93 var g = w.getSelection; 94 d.selectNodeContents(txt); 95 g().removeAllRanges(); 96 g().addRange(d); 97 m.execCommand('copy'); 98 g().removeAllRanges(); 99 } 100 txt.remove(); 101}
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.