NowDate = new Date(); NowYear = NowDate.getFullYear(); //■今、何年? NowMonth = NowDate.getMonth() + 1; //■今、何月? NowDay = NowDate.getDate(); //■今、何日? NowHours = NowDate.getHours(); //■今、何時? NowMinutes = NowDate.getMinutes(); //■今、何分? $(function(){ //Masonry var $container = $('#blog_contents'); $container.imagesLoaded( function(){ $container.masonry({ itemSelector: '.contents_block', isResizable: true, isAnimated: true }); }); //Page Top var pagetop = $('.pagetop'); pagetop.hide(); $(window).scroll(function() { if ($(this).scrollTop() > 100) { pagetop.fadeIn(); } else { pagetop.fadeOut(); } }); }); /* ブログ(新規)用 $(function(){ $tab = $('#blog_links span strong'); $menu= $('#blog_links span span'); $close= $('.menu_close'); $tab.on('mousedown', function(){ if( $(document).width() < 768 ){ $menu.hide(); $(this).next('span').fadeIn(); } }); $menu.bind('touchend', function(){ if( $(document).width() < 768 ){ $(this).fadeOut(); } }); $menu.on('mouseleave', function(){ if( $(document).width() < 768 ){ $(this).fadeOut(); } }); $close.on('mousedown', function(){ if( $(document).width() < 768 ){ $(this).parent().fadeOut(); } }); if($(document).width() > 768){ $menu.show(); } }); */ // ******************************************************* // jquery.belatedPNG.min.js // ******************************************************* $(function(){ // belatedPNG if(! $.support.opacity && !! ActiveXObject){ $(".pngfix").fixPng(); } }); // ■■■■■■■■■■■■■■■■■■■■■■■■■■■■ //    jQuery スムーズスクロール // ■■■■■■■■■■■■■■■■■■■■■■■■■■■■ (function($){ $.extend({ smoothAnchors : function(speed, easing, redirect){ speed = speed || "fast"; easing = easing || null; redirect = (redirect === true || redirect == null) ? true : false; $("a").each(function(i){ var url = $(this).attr("href"); if(url){ if(url.indexOf("#") != -1 && url.indexOf("#") == 0){ var aParts = url.split("#",2); var anchor = $("a[name='"+aParts[1]+"']"); if(anchor){ $(this).click(function(){ if($(document).height()-anchor.offset().top >= $(window).height() || anchor.offset().top > $(window).height() || $(document).width()-anchor.offset().left >= $(window).width() || anchor.offset().left > $(window).width()){ $('html, body').animate({ scrollTop: anchor.offset().top, scrollLeft: anchor.offset().left }, speed, easing, function(){ if(redirect){ window.location = url } }); } return false; }); } } } }); } }); })(jQuery); $(document).ready(function(){ $.smoothAnchors("fast"); });