/* Js for http://www.baidu.com, Version=1741234365 */ place9757a20d0002d3f6e8cf02b8f01c6045='IDLIST_PLACEHOLDER1264,1263,1262,1261,1260,1259,1258,1257,1256,1255,IDLIST_PLACEHOLDER';; $(document).ready(function() { $('.tree .list-toggle').mousedown(function(){$(this).parents('.panel-block').height('auto');}) $('.row.blocks .tree').resize(function(){$(this).parents('.row.blocks').tidy({force: true});}) }) ; var currentBlockID = 350; if(typeof($('#block' + currentBlockID).parent('.col').data('grid')) === 'undefined' && $('#block' + currentBlockID).parent('.col').data('probability') === 'undefined') { var grid = $('#block' + currentBlockID).parents('.blocks').data('grid'); grid = typeof(grid) == 'undefined' ? 12 : grid; $('#block' + currentBlockID).parent('.col').attr('data-grid', grid).attr('class', 'col col-' + grid); } $('.articleTitleA').each(function() { $(this).css('max-width', $(this).parents('li').width() - $(this).prev('.category').width() - $(this).next('.sticky').width() - $(this).parent().next('.article-date').width() - 10); }) $('.articleTitleB').each(function() { $(this).css('max-width', $(this).parent('li').width() - $(this).next('.sticky').width() - 10); }) ;$().ready(function() { $('#execIcon').tooltip({title:$('#execInfoBar').html(), html:true, placement:'right'}); }); ;$(document).ready(function() { /* Set current active topNav. */ if(v.path && v.path.length) { $.each(v.path, function(index, category) { $('.nav-blog-' + category).addClass('active'); }) } if(typeof(v.categoryID) != 'undefined') $('#category' + v.categoryID).parent().addClass('active'); $('body').tooltip( { html: true, selector: "[data-toggle=tooltip]", container: "body" }); }); $(function(){ $("#searchbar .input-group .form-control").attr("value","输入你要找的关键词").css("color","#888").focus(function(){ if($(this).val()== "输入你要找的关键词"){ $(this).val(""); } $(this).css("background-color","#fc772a").css("color","#FFF"); }).blur(function(){ $(this).css("background-color","#fff").css("color","#888"); }); $("#header").after($(".all-bottom")); }); //设置导航条固定在顶部 $(function(){ var nav=$("#navbar"); //得到导航对象 var win=$(window); //得到窗口对象 var sc=$(document);//得到document文档对象。 win.scroll(function(){ if(sc.scrollTop()>=200){ nav.addClass("fixednav"); $(".navTmp").fadeIn(); }else{ nav.removeClass("fixednav"); $(".navTmp").fadeOut(); } }) }) ; var hash = window.location.hash.substring(1); var browserLanguage = navigator.language || navigator.userLanguage; var resolution = screen.availWidth + ' X ' + screen.availHeight; $.get(createLink('log', 'record', "hash=" + hash), {browserLanguage:browserLanguage, resolution:resolution});