PageSourceSearch

https://athena-ptr.co.jp/3.2/js/widget/widget_menu02.js

js athena-ptr.co.jp collected 2026-10-05 11:15:56 UTC 1,962 bytes, 85 lines download raw bytes

1(function($){ 
2
3	Array.prototype.min = function(){ return Math.min.apply({},this) };
4	Array.prototype.max = function(){ return Math.max.apply({},this) };
5	$.fn.masonry = function() {
6		this.each(function() {
7			var wall = $(this);
8			if ( wall.children().length > 0 ) {
9				if( wall.children('.masonryWrap').length == 0 ) {
10					wall.wrapInner('<div class=\"masonryWrap\"></div>');
11				}
12				var mWrap = wall.children('.masonryWrap');
13	
14				var brick = mWrap.children();
15				var brickW = brick.outerWidth(true);
16				var colCount = Math.floor( mWrap.width() / brickW ) ;
17				
18				var colH=new Array();
19				for ( i=0; i < colCount; i++) {
20					colH[ i ] =  0 ;
21				}		
22				
23				mWrap.css({ position: 'relative' });
24				
25				brick.css({
26						float: 'none',
27						position: 'absolute',
28						display: 'block'
29					})
30					.each(function(){
31						for ( i=colCount-1; i > -1; i-- ) {
32							if ( colH[ i ] == colH.min() ) {
33								var thisCol = i;
34							}
35						}
36						$(this).css({
37							top: colH[ thisCol ],
38							left: brickW * thisCol
39						});
40						colH[ thisCol ] += $(this).outerHeight(true);
41					});
42				
43				mWrap.height( colH.max() );
44			}
45
46			return this; 
47		});
48	};
49})(jQuery);
50
51$(function(){
52	
53	function menuM(){
54		$('body:not(.edit_view) .widget_menu01.add_design7 .items ul').masonry();
55	}
56	$(window).on('resize', menuM);
57	menuM();
58	$(window).load(function(){
59		menuM();
60	});
61	
62});
63
64$(window).load(function(){
65
66	$('.block_menu_1.add_design2 .inner_item:nth-of-type(2n)').each(function(){
67		var r = 0;
68		var $img = $(this).find('.category_img img');
69		var ratio = $img .height() / $img .width();
70		var $img2 = $(this).prev('.inner_item').find('.category_img img');
71		var ratio2 = $img2 .height() / $img2 .width();
72		if(ratio < ratio2){
73			r = ratio;
74		}else{
75			r = ratio2;
76		}
77		function ResizeS1(){
78			$img.css({height: $img.width()*r});
79			$img2.css({height: $img2.width()*r});
80		}
81		ResizeS1();
82		$(window).on('resize', ResizeS1);
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.