7.2 Earthquake strikes south & central Mexico

");
    alink.addClass("disabled");
    if (isNaN(pageNum)) {
        return;
    }
    var url = ajaxUrl + "autoflowId=" + autoflowId + "&pageNum=" + pageNum;
    if (false) {
        var tmpLimit = $("#filter-mod-infinite-scrolling-media-headline-list-667495367").find("option:selected").attr("data-limit-number");
        url = url.replace(url.substring(url.indexOf("tmpLimit"), url.indexOf("&", url.indexOf("tmpLimit"))), "tmpLimit=" + tmpLimit);
    }
    $.ajax({
        type : "GET",
        url : url
    }).done(function(html) {
        pageNum++;
        loadMore.attr("pageNum", pageNum);
        var contentHTML = $(html).filter("ul");
        var stories = $('#content-mod-infinite-scrolling-media-headline-list-667495367').children('ul').first();
        var isViewList = stories.hasClass("view-list");
        if (isViewList) {
            if ("grid1" == "grid1") {
                contentHTML.addClass("list media show-inline-ad small-block-grid-1 medium-block-grid-2 large-block-grid-3 view-list");
            } else if ("grid1" == "grid2") {
                contentHTML.addClass("list media bricks view-list");
            }
        } else {
            if ("grid1" == "grid1") {
                contentHTML.addClass("list media show-inline-ad small-block-grid-1 medium-block-grid-2 large-block-grid-3 view-grid");
            } else if ("grid1" == "grid2") {
                contentHTML.addClass("list media bricks view-grid");
            }
        }
        $('#content-mod-infinite-scrolling-media-headline-list-667495367 .loader').remove();
        $("#content-mod-infinite-scrolling-media-headline-list-667495367").append(contentHTML);
        alink.removeClass("disabled");
        $(window).trigger('ep-imgloadgroup-refresh');
    }).fail(function() {
        $("#content-mod-infinite-scrolling-media-headline-list-667495367").append("<p class="text-center">Oops. Something went wrong. Please wait a minute and refresh your browser.</p>");
    });
});
$("#filter-mod-infinite-scrolling-media-headline-list-667495367").change(function(){
    var loadMore = $('#load-more-mod-infinite-scrolling-media-headline-list-667495367');
    loadMore.attr("pageNum", 2);
    var autoflowId = $(this).children("option:selected").val();
    loadMore.attr("autoflowId", autoflowId);
    var ajaxUrl = $(this).attr("ajaxUrl");
    var tmpLimit = $(this).children("option:selected").attr("data-limit-number");
    var url = ajaxUrl + autoflowId;
    url = url.replace(/tmpLimitNum/, tmpLimit);
            loadMore.hide();
    loadMore.children('a').removeClass("disabled");
    var content = $("#content-mod-infinite-scrolling-media-headline-list-667495367");
    content.empty();
    content.append("<div class="loader"><img src="http://mundolatinomedia.com/wp-content/uploads/2018/02/loader.gif" alt="Loading"/></div>");
    $.ajax({
        type : "GET",
        url : url
    }).done(function(html) {
        var contentHTML = $(html).filter("ul");
        var isViewList = content.children('ul').first().hasClass("view-list");
        content.empty();
        if (isViewList) {
            if ("grid1" == "grid1") {
                contentHTML.addClass("list media show-inline-ad small-block-grid-1 medium-block-grid-2 large-block-grid-3 view-list");
            } else if ("grid1" == "grid2") {
                contentHTML.addClass("list media bricks view-list");
            }
        } else {
            if ("grid1" == "grid1") {
                contentHTML.addClass("list media show-inline-ad small-block-grid-1 medium-block-grid-2 large-block-grid-3 view-grid");
            } else if ("grid1" == "grid2") {
                contentHTML.addClass("list media bricks view-grid");
            }
        }
        content.append(contentHTML);
        $(window).trigger('ep-imgloadgroup-refresh');
        loadMore.show();
    }).fail(function() {
        content.append("<p class="text-center">Oops. Something went wrong. Please wait a minute and refresh your browser.</p>");
    });
});

})(jQuery, AUI());

<p class="wpematico_credit"><small>Powered by <a href="http://www.wpematico.com" target="_blank">WPeMatico</a></small></p>

Related posts