1function ajax_loadTabContent(tab_name, page_num, container, args_obj) { 2 var post_not_id = Ajax_post_id.post_not_id; 3 var container = jQuery(container); 4 var tab_content = container.find("#" + tab_name + "-tab-content"); 5 var isLoaded = tab_content.data("loaded"); 6 if (!isLoaded || page_num != 1) { 7 if (!container.hasClass("ajax-loading")) { 8 container.addClass("ajax-loading"); 9 tab_content.load(ajax_tab.ajax_url, { 10 action: "ajax_widget_content", 11 exclude: post_not_id, 12 tab: tab_name, 13 page: page_num, 14 args: args_obj 15 }, 16 function() { 17 container.removeClass("ajax-loading"); 18 tab_content.data("loaded", 1).hide().fadeIn().siblings().hide(); 19 lazy(); 20 }) 21 } 22 } else { 23 tab_content.fadeIn().siblings().hide() 24 } 25} 26 27jQuery(document).ready(function() { 28 jQuery(".ajax_widget_content").each(function() { 29 var $this = jQuery(this); 30 var widget_id = this.id; 31 var args = $this.data("args"); 32 $this.find(".ajax-tabs a").click(function(e) { 33 e.preventDefault(); 34 jQuery(this).parent().removeClass("tab-first"); 35 jQuery(this).parent().addClass("selected").siblings().removeClass("selected"); 36 var tab_name = this.id.slice(0, -4); 37 ajax_loadTabContent(tab_name, 1, $this, args) 38 }); 39 $this.on("click", ".ajax-pagination a", 40 function(e) { 41 e.preventDefault(); 42 var $this_a = jQuery(this); 43 var tab_name = $this_a.closest(".tab-content").attr("id").slice(0, -12); 44 var page_num = parseInt($this_a.closest(".tab-content").children(".page_num").val()); 45 if ($this_a.hasClass("next")) { 46 ajax_loadTabContent(tab_name, page_num + 1, $this, args) 47 } else { 48 $this.find("#" + tab_name + "-tab-content").data("loaded", 0); 49 ajax_loadTabContent(tab_name, page_num - 1, $this, args) 50 } 51 }); 52 $this.find(".ajax-tabs a").first().click() 53 }) 54});
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.