forked from berkmancenter/berkman_custom_hewlett
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hewlett.js
executable file
·48 lines (42 loc) · 1.67 KB
/
hewlett.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
jQuery(document).ready(function(){
if(jQuery('body.home').length > 0){
// This URL works only on the homepage. Need a better pattern if we're going to use this elsewhere on the site.
jQuery.ajax({
type: 'GET',
cache: false,
url: 'people/',
success: function(html){
var interiorHTML = jQuery(html).find('ul.participants-items').html();
jQuery('ul.xoxo').prepend('<aside class="widget-container"><h3 class="widget-title">People</h3><ul class="slideshow">' + interiorHTML + '</ul></aside>').find('ul.slideshow').cycle({fx: 'scrollUp'});
},
complete: function(){
jQuery('ul.slideshow a').attr('href','/speakers/');
}
});
}
jQuery('.mid-slideshow').cycle({
fx: 'scrollHorz' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
});
jQuery('#site-title').bind({
click: function(){
//TODO: fix this when we start working under the "real" domain.
window.location.href = '/';
},
mouseover: function(){
jQuery(this).css({cursor: 'pointer'});
}
});
if(jQuery('.page-id-430').length > 0){
jQuery('.filters img').hide();
jQuery('.filters a').click(function(e){
if(jQuery(this).attr('title').length > 0){
jQuery('.filters img').show();
e.preventDefault();
var desiredStuff = jQuery(this).attr('title');
jQuery('.archive-item:not(' + desiredStuff + ')').hide('slow');
jQuery('.archive-item' + desiredStuff).show('slow', function(){jQuery('.filters img').hide()});
}
});
}
jQuery(function() { var $container = jQuery('.masonry-container'); $container.imagesLoaded(function(){ $container.masonry({ itemSelector : '.masonry-item', columnWidth : 241 }); }); });
});