PageSourceSearch

https://www.olomedia.com/wp-content/themes/olomedia/theme-admin/ajax/masonry-ajax.js

js olomedia.com collected 2026-09-24 10:58:20 UTC 4,977 bytes, 150 lines download raw bytes

1jQuery(document).ready(function($) {
2	
3	jQuery(".hm_filter_wrapper.masonry_posts .centered .btn_c").click(function(event){
4		event.preventDefault();
5		more_button  = jQuery(this);
6		content_area = more_button.parent().prev();
7		offset       = more_button.data('offset');	
8		all_posts    = more_button.data('all-posts');
9		post_type_is = more_button.data('post-type');
10		masonry_column = more_button.data('masonry-column');
11		masonry_type = more_button.data('masonry-type');
12		number_posts_loaded = more_button.data('loaded_num');
13		
14		check_loaded = parseInt(offset)+parseInt(number_posts_loaded);
15		
16		jQuery.ajax({
17			type: "post",
18			url: ajax_masonry.url,
19			dataType: 'html',
20			data: "action=ajax_masonry&nonce="+ajax_masonry.nonce+"&offset="+offset+"&number_posts_loaded="+number_posts_loaded+"&post_type_is="+post_type_is+"&masonry_column="+masonry_column+"&masonry_type="+masonry_type,
21			beforeSend : function () {
22				            content_area.animate({ opacity: 0.3 }, 300);
23				$('.hm_ajax_loader_con').animate({ opacity: 1   }, 300);
24				
25				more_button.css({"cursor":"no-drop","opacity":0.4});
26			},
27			success: function(data){
28				if (check_loaded >= all_posts) {
29					        content_area.animate({ opacity: 1 }, 300);
30				$('.hm_ajax_loader_con').animate({ opacity: 0 }, 300);
31				
32					more_button.css({"cursor":"pointer","opacity":1});
33					more_button.parent().append('<span class="timeline_no_more">'+ajax_masonry.empty+'</span>').hide().fadeIn();
34					more_button.remove();
35				}
36				if (data !== '') {
37
38					var $divajax = $('.masonry_store').html(data).hide();
39					
40					$divajax.imagesLoaded(function() {
41						
42						var htmlll = $divajax.html();
43						newItems = $(htmlll).appendTo(content_area);
44				    	$(content_area).isotope('appended', newItems );
45						
46						$divajax.html('');
47						
48						// Self Hosted 
49						if ( $.isFunction($.fn.mediaelementplayer) ) {
50							$("audio.hosted_audio:not(.self_hosted_worked)").mediaelementplayer();
51							$("video.hosted_video:not(.self_hosted_worked)").mediaelementplayer({
52								alwaysShowControls: true,
53							});
54						}
55		                $("audio.hosted_audio:not(.self_hosted_worked), video.hosted_video:not(.self_hosted_worked)").addClass("done_porto_galla");
56						
57						// Owl
58						$(".porto_galla:not(.done_porto_galla)").owlCarousel({
59							slideSpeed : 900,
60							autoPlay : 3000,
61							autoHeight : false,
62							singleItem:true,
63							stopOnHover : true,
64							navigation : true,
65							pagination : true,
66							navigationText : [
67								"<span class='olo_owl_p'><i class='ico-angle-left'></i></span>",
68								"<span class='olo_owl_n'><i class='ico-angle-right'></i></span>"],
69						});
70						
71						// Owl Light Image
72						$('.porto_galla:not(.done_porto_galla)').magnificPopup({
73							delegate: 'a',
74							type: 'image',
75							gallery: {
76								enabled: true
77							},
78							removalDelay: 500,
79							callbacks: {
80								beforeOpen: function() {
81									this.st.image.markup = this.st.image.markup.replace('mfp-figure', 'mfp-figure mfp-with-anim');
82									this.st.mainClass = "mfp-zoom-in";
83								}
84							},
85							closeOnContentClick: true,
86						  
87						});
88			            $(".porto_galla").addClass("done_porto_galla");
89						
90						$(".magnific-popup:not(done_magnific), a[data-rel^='magnific-popup']:not(done_magnific)").magnificPopup({ 
91							type: 'image',
92							mainClass: 'mfp-with-zoom',
93							zoom: {
94								enabled: true,
95								duration: 300,
96								easing: 'ease-in-out',
97								opener: function(openerElement) {
98									return openerElement.is('img') ? openerElement : openerElement.find('img');
99								}
100							}
101							
102						});
103						$(".magnific-popup, a[data-rel^='magnific-popup']").addClass("done_magnific");
104						
105						$('.expand_image').each(function(index, element) {
106							$(this).click(function() {								
107								$(this).parent().siblings("a").click();
108								$(this).parent().siblings(".porto_galla").find("a:first").click();
109								return false;
110							});
111						});
112						
113						// Animated
114						$('.animated').each(function(index, element) {
115							var elem = $(this);
116							var animation = elem.data('animation');
117							if ( !elem.hasClass('visible') ) {
118								var animationDelay = elem.data('animation-delay');
119								if ( animationDelay ) {
120					
121									setTimeout(function(){
122										elem.addClass( animation + " visible" );
123										elem.removeClass('hiding');
124									}, animationDelay);
125					
126								} else {
127									elem.addClass( animation + " visible" );
128									elem.removeClass('hiding');
129								}
130							}
131						});
132						
133						            content_area.animate({ opacity: 1 }, 300);
134						$('.hm_ajax_loader_con').animate({ opacity: 0 }, 300);
135						
136						more_button.css({"cursor":"pointer","opacity":1}
136);
137					});
138  
139				}
140				more_button.data('offset', offset+number_posts_loaded);
141			}
142			,
143			complete: function (data) {
144				
145			}
146		});
147		//console.log(offset);
148	});
149		
150});

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.