$(function() { function news_loadmore_loadmore_index( id, index_count_i, index_count_limit, href ){ $("#container > article#news > div.index > ul > li.load_more > a").stop().animate({"opacity": 0}, 400,"easeOutQuad",function(){ $.ajax({ url: "https://www.hokuto-home.co.jp/ajax_news_land_event_load.php", data: "id=" + encodeURI(id) + "&index_count_i=" + index_count_i + "&index_count_limit=" + index_count_limit + "", success: function(data, dataType){ _gaq.push(['_trackPageview', '/' + href ]); $("#container > article#news > div.index > ul > li.load_more").remove(); $("#container > article#news > div.index > ul").append( data ); img_load_fade(); }, complete: function(XMLHttpRequest, textStatus){ }, error: function(XMLHttpRequest, textStatus, errorThrown){ } }); }); } $(document).on("click", "#container > article#news > div.index > ul > li.load_more > a", function(){ var id = $(this).attr("data-id"); var index_count_i = $(this).attr("data-index_count_i"); var index_count_limit = $(this).attr("data-index_count_limit"); var href = $(this).attr("href").replace( "https://www.hokuto-home.co.jp/", "" ); news_loadmore_loadmore_index( id, index_count_i, index_count_limit, href ); return false; }); function event_loadmore_loadmore_index( id, index_count_i, index_count_limit, href ){ $("div#entry > article.eventlist > div.body > section.index.event."+id+" > ul > li.load_more").stop().animate({"opacity": 0}, 400,"easeOutQuad",function(){ $.ajax({ url: "https://www.hokuto-home.co.jp/ajax_eventlist_load.php", data: "id=" + encodeURI(id) + "&index_count_i=" + index_count_i + "&index_count_limit=" + index_count_limit + "", success: function(data, dataType){ _gaq.push(['_trackPageview', '/' + href ]); $("div#entry > article.eventlist > div.body > section.index.event."+id+" > ul > li.load_more").remove(); $("div#entry > article.eventlist > div.body > section.index.event."+id+" > ul").append( data ); img_load_fade(); }, complete: function(XMLHttpRequest, textStatus){ }, error: function(XMLHttpRequest, textStatus, errorThrown){ } }); }); } $(document).on("click", "div#entry > article.eventlist > div.body > section.index.event > ul > li.load_more > a", function(){ var id = $(this).attr("data-id"); var index_count_i = $(this).attr("data-index_count_i"); var index_count_limit = $(this).attr("data-index_count_limit"); var href = $(this).attr("href").replace( "https://www.hokuto-home.co.jp/", "" ); event_loadmore_loadmore_index( id, index_count_i, index_count_limit, href ); return false; }); function land_loadmore_loadmore_index( id, index_count_i, index_count_limit, href ){ $("div#entry > article.landlist > div.body > section.index.land."+id+" > ul > li.load_more").stop().animate({"opacity": 0}, 400,"easeOutQuad",function(){ $.ajax({ url: "https://www.hokuto-home.co.jp/ajax_landlist_load.php", data: "id=" + encodeURI(id) + "&index_count_i=" + index_count_i + "&index_count_limit=" + index_count_limit + "", success: function(data, dataType){ console.log("aaa"); _gaq.push(['_trackPageview', '/' + href ]); $("div#entry > article.landlist > div.body > section.index.land."+id+" > ul > li.load_more").remove(); $("div#entry > article.landlist > div.body > section.index.land."+id+" > ul").append( data ); img_load_fade(); }, complete: function(XMLHttpRequest, textStatus){ }, error: function(XMLHttpRequest, textStatus, errorThrown){ } }); }); } $(document).on("click", "div#entry > article.landlist > div.body > section.index.land > ul > li.load_more > a", function(){ var id = $(this).attr("data-id"); var index_count_i = $(this).attr("data-index_count_i"); var index_count_limit = $(this).attr("data-index_count_limit"); var href = $(this).attr("href").replace( "https://www.hokuto-home.co.jp/", "" ); land_loadmore_loadmore_index( id, index_count_i, index_count_limit, href ); return false; }); function htmlEncode(value){ return $('
').text(value).html(); } function htmlDecode(value){ return $('
').html(value).text(); } function img_load_fade(){ $("img.preload:not('.loaded')").imagesLoaded(function(){ $(this).addClass("loaded"); }); } $("img.preload:not('.loaded')").each(function(){ $(this).imagesLoaded(function(){ $(this).addClass("loaded"); }); }); });