summaryrefslogtreecommitdiff
path: root/public/assets/js/app.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2016-03-30 12:42:31 -0400
committerJules Laplace <jules@okfoc.us>2016-03-30 12:42:31 -0400
commit42ca8182e820d95e939321bf027886824b25624d (patch)
tree594c8ea62ccf1a7ba54033354d47c78bca049e48 /public/assets/js/app.js
parent1a99f27f5351c9460cc2d03d328ef84e85daf4f1 (diff)
resizing
Diffstat (limited to 'public/assets/js/app.js')
-rw-r--r--public/assets/js/app.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/public/assets/js/app.js b/public/assets/js/app.js
index 2151dab..eff6dab 100644
--- a/public/assets/js/app.js
+++ b/public/assets/js/app.js
@@ -63,7 +63,7 @@ var app = (function() {
}
app.resize = function(){
- $(".active .cell,.active .next,.active .previous").css({ 'display': 'none' })
+ // $(".active .cell,.active .next,.active .previous").css({ 'display': 'none' })
$('body').addClass('resizing')
debounce(function() {
$(".active.item").addClass("hidden")
@@ -83,16 +83,18 @@ var app = (function() {
})()
-var heights = []
$(".item").each(function(i){
var height = window.innerHeight - $(this).find(".bottom").height()
- console.log(height)
$(".cell, .top", this).css({ 'height': height })
})
-$('.top').flickity(app.flickity_options).on( 'cellSelect', function(e) {
- var gallery = $(e.target).data('flickity')
- app.header.updateSlideNumber( gallery.selectedIndex )
+$('.top').each(function(){
+ if ($(this).find(".cell").length > 1) {
+ $(this).flickity(app.flickity_options).on( 'cellSelect', function(e) {
+ var gallery = $(e.target).data('flickity')
+ app.header.updateSlideNumber( gallery.selectedIndex )
+ })
+ }
})
$(".item").each(function(i){