PageSourceSearch

https://relate.com.my/wp-content/themes/the-core-parent/framework-…/static/js/scripts.js?ver=1.0.42

js relate.com.my collected 2026-09-25 04:10:06 UTC 3,151 bytes, 85 lines download raw bytes

1jQuery(document).ready(function () {
2
3	theCorePostsMatchHeight();
4
5	// parse on ready and hide load more button
6	jQuery('.fw-js-load-more-posts .fw-btn').each(function () {
7		var this_button = jQuery(this),
8			page        = jQuery(this).parents('.fw-shortcode-latest-posts').attr('data-page'),
9			max_pages   = jQuery(this).parents('.fw-shortcode-latest-posts').data('max-pages');
10
11		// here need ">", because default page is 2 and if you have 4 posts / 2 per page then page=2 and max_pages=2
12		if (page > max_pages) {
13			this_button.parents('.fw-js-load-more-posts').hide();
14		}
15	});
16
17	jQuery('.fw-js-load-more-posts').on('click', '.fw-btn', function (e) {
18		e.preventDefault();
19		var this_button    = jQuery(this),
20			page           = jQuery(this).parents('.fw-shortcode-latest-posts').attr('data-page'),
21			blog_type      = jQuery(this).parents('.fw-shortcode-latest-posts').data('blog-type'),
22			posts_per_page = jQuery(this).parents('.fw-shortcode-latest-posts').data('posts-per-page'),
23			max_pages      = jQuery(this).parents('.fw-shortcode-latest-posts').data('max-pages'),
24			category       = jQuery(this).parents('.fw-shortcode-latest-posts').data('category'),
25			blog_view      = jQuery(this).parents('.fw-shortcode-latest-posts').data('blog-view'),
26			columns        = jQuery(this).parents('.fw-shortcode-latest-posts').data('columns'),
27			extra          = jQuery(this).parents('.fw-shortcode-latest-posts').data('extra'),
28			lang           = FwPhpVars.lang;
29
30		var data = "action=the_core_ajax_get_shortcode_posts&max_pages=" + max_pages + '&lang=' + lang+'&blog_type=' + blog_type + '&blog_view=' + blog_view + '&columns=' + columns + '&posts_per_page=' + posts_per_page + '&category=' + category + '&page=' + page + '&extra=' + extra;
31		jQuery.ajax({
32			type: "POST",
33			url: FwPhpVars.ajax_url,
34			data: data,
35			success: function (rsp) {
36				//console.log(rsp);
37				if ( typeof rsp == 'object' ) {
38					var obj = rsp;
39				}
40				else {
41					var obj = jQuery.parseJSON(rsp);
42				}
43
44				if ( obj.html != '' ) {
45					this_button.parents('.fw-js-load-more-posts').before(obj.html);
46				}
47
48				if ( this_button.parents('.fw-shortcode-latest-posts').hasClass("postlist-grid") && this_button.parents('.fw-shortcode-latest-posts').hasClass("fw-portfolio-masonry-on") ) {
49					var $container = this_button.parents('.postlist-grid');
50					$container.isotope('reloadItems');
51					$container.isotope({
52						itemSelector: '.postlist-col'
53					});
54				}
55				else {
56					theCorePostsMatchHeight();
57				}
58
59				if( page >= max_pages ) {
60					this_button.parents('.fw-js-load-more-posts').hide();
61				}
62
63				this_button.parents('.fw-shortcode-latest-posts').attr('data-page', parseInt(page) + 1);
64			}
65		});
66
67		return false;
68	});
69});
70
71
72function theCorePostsMatchHeight() {
73  if (jQuery('.fw-shortcode-latest-posts.fw-portfolio-masonry-off').length > 0) {
74    $.fn.matchHeight._maintainScroll = true;
75    jQuery('.fw-shortcode-latest-posts.fw-portfolio-masonry-off').each(function () {
76      jQuery(this).find('article').matchHeight({
77        byRow: true,
78        property: 'height',
79        target: null,
80        remove: false
81      });
82    });
83  }
84}
85

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.