PageSourceSearch

https://www.domedeco.com/wp-content/plugins/dd-projects/js/scripts.js

js domedeco.com collected 2026-10-08 21:29:35 UTC 5,050 bytes, 168 lines download raw bytes

1jQuery(document).ready(function() {
2	
3	/*
4	console.log('init slick slider');
5    jQuery('.project-slider').slick({
6		autoplay: false,
7		infinite: true,
8  		slidesToShow: 1,
9		centerMode: true,
10		variableWidth: true,
11		centerpadding: '15%'
12	});
13	*/
14	//console.log('init fancybox');
15	//jQuery('[data-fancybox="gallery"]').fancybox({
16		// Options will go here
17	//});
18	/*
19	jQuery(".dd-project-filter a").on("click", function(){ 
20		
21		console.log('filter link clicked: ' + jQuery(this).data('slug'));
22		var slug = jQuery(this).data('slug');
23		//hide all tiles and show tiles with css class equal to data('slug')
24		jQuery( ".dd-project-panel .dd-project-tile" ).each(function( index ) {
25			//console.log( index + ": " + jQuery( this ).text() );
26			var classes = jQuery(this).attr('class').split(' ');
27			
28			console.log('class: ' + classes[0])
29
30			if(jQuery.inArray(slug, classes) !== -1)
31			{
32				jQuery( this ).opacity = 1;
33				jQuery( this ).show();
34			} else {
35				jQuery( this ).opacity = 0;
36				jQuery( this ).hide();
37			}
38		});
39		
40
41
42
43		return false;
44	});
45	*/
46	var grid = jQuery('.dd-project-panel').isotope({
47		// options
48		itemSelector: '.dd-project-tile',
49		layoutMode: 'fitRows'
50	  });
51	var projectCount = jQuery('.dd-project-count');
52
53	  jQuery('.dd-project-filter a').on( 'click', function() {
54		//console.log('click filter');
55		//var filterValue = jQuery(this).attr('data-slug');
56		var filterValue = '.' + jQuery(this).data('slug');
57		//console.log('');
58		if(filterValue=='.*') filterValue = '*';
59		grid.isotope({ filter: filterValue });
60
61		
62		
63		//add highlight to link
64		jQuery( ".dd-project-filter a" ).each(function( index ) {
65			//jQuery(this).css('font-weight', '300');
66			jQuery(this).removeAttr( "style" );
67		  });
68		jQuery(this).css('font-weight', '700');
69
70
71		var iso = jQuery('.dd-project-panel').data('isotope');
72		projectCount = projectCount.html( iso.filteredItems.length + ' Projects');// grid.filteredItems.length + ' Projects'
73		//console.log('item count: ' + iso.filteredItems.length);
74		return false;
75	  });
76
77	  
78
79	  jQuery('.project-template-default .slider-nav.previous').on( 'click', function() {
80		//console.log('previous clicked');
81		var slider = jQuery( '.wp-slick-slider' );
82		slider.slick("slickPrev")
83	  });
84
85	  jQuery('.project-template-default .slider-nav.next').on( 'click', function() {
86		//console.log('next clicked');
87		var slider = jQuery( '.wp-slick-slider' );
88		slider.slick("slickNext");
89	  });
90	  
91	  //set width of slides since iOS is not good at this
92	  //console.log('set width of slides');
93	  
94	  jQuery('.wp-slick-slider .slick-slide a img').each(function(index) {
95		//console.log('image' + index);
96		//console.log('natural width '+index+': ' + jQuery(this).prop("naturalWidth"));
97		//console.log('natural height '+index+': ' + jQuery(this).prop("naturalHeight"));
98		currentHeight = jQuery(this).height();
99		width = jQuery(this).prop("naturalWidth");
100		height = jQuery(this).prop("naturalHeight");
101		ratio = width / height;
102		jQuery(this).width(currentHeight * ratio);
103	  });
104
105	  //filter on correct items for selected page
106	  //and add highlight to link
107	  jQuery( ".dd-project-filter a" ).each(function( index ) {
108		//jQuery(this).css('font-weight', '300');
109		jQuery(this).removeAttr( "style" );
110	  });
111
112	  var pathname = window.location.pathname;
113	  //console.log('path: ' + pathname);
114	  var url = pathname.split('/');
115	  //console.log(url);
116	  if(url[2])
117	  {
118	  	//console.log('subcategory selected');
119	  	//find project term
120	  	var subcategory = jQuery('#term-slug').html();
121		//console.log(subcategory);
122		//highlight subcategory
123		var li = jQuery('*[data-slug="'+subcategory+'"]');
124		li.css('font-weight', '700');
125		//highlight parent category
126		//var parent = jQuery('*[data-slug="'+url[1]+'"]');
127		//parent.css('font-weight', '700');
128		//filter grid on subcategory
129		grid.isotope({ filter: '.' + subcategory });
130	  }
131
132	  if(pathname == '/projects/') {
133		grid.isotope({ filter: '.projects' });
134		//jQuery(".dd-project-filter a[data=slug='projects']").css('font-weight', '700');
135		var element = jQuery('*[data-slug="projects"]');
136		element.css('font-weight', '700');
137	  }
138
139	  if(pathname == '/architects/') {
140		grid.isotope({ filter: '.architect' });
141		var element = jQuery('*[data-slug="architect"]');
142		element.css('font-weight', '700');
143	  }
144
145	  if(pathname == '/retail/') {
146		grid.isotope({ filter: '.retail' });
147		var element = jQuery('*[data-slug="retail"]');
148		element.css('font-weight', '700');
149	  }
150
151
152});
153
154
155jQuery( window ).resize(function() {
156	//console.log('set width of slides on resize');
157	jQuery('.wp-slick-slider .slick-slide a img').each(function(index) {
158		//console.log('image' + index);
159		//console.log('natural width '+index+': ' + jQuery(this).prop("naturalWi
159dth"));
160		//console.log('natural height '+index+': ' + jQuery(this).prop("naturalHeight"));
161		currentHeight = jQuery(this).height();
162		width = jQuery(this).prop("naturalWidth");
163		height = jQuery(this).prop("naturalHeight");
164		ratio = width / height;
165		jQuery(this).width(currentHeight * ratio);
166	  });
167  });
168

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.