diff options
| author | Jules Laplace <jules@okfoc.us> | 2016-03-29 12:42:27 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2016-03-29 12:42:27 -0400 |
| commit | 585177bbf2a78504b5843d843392653f280a7605 (patch) | |
| tree | 283481b7e8c2840124069def22ca4ceaf3177efd | |
| parent | 6d2835c1b7838594f1ca9cb3c1a8fa072657722e (diff) | |
update slide number
| -rw-r--r-- | db.json | 2 | ||||
| -rw-r--r-- | public/assets/js/app.js | 7 |
2 files changed, 6 insertions, 3 deletions
@@ -21,7 +21,7 @@ "uri": "http://nytimes.com/" } ], - "__index": 0, + "__index": "0", "dateCreated": "Sat, 26 Mar 2016 20:34:21 GMT", "client": "Annapurna Pictures", "containImage": "true", diff --git a/public/assets/js/app.js b/public/assets/js/app.js index b8992ea..b38d151 100644 --- a/public/assets/js/app.js +++ b/public/assets/js/app.js @@ -38,7 +38,7 @@ var app = (function() { })() -app.init() +// app.init() $(".cell, .next").css({ 'height': ($(".top").height() + 'px') }); @@ -54,6 +54,9 @@ $('.top').flickity({ x2: 40, y2: 25, x3: 15 } +}).on( 'cellSelect', function(e) { + var gallery = $(e.target).data('flickity') + $(".slide-no").html(gallery.selectedIndex + 1) }) $(".previous, .next").css({ 'height': ($(".top").height() + 'px') }); @@ -83,4 +86,4 @@ $(window).resize(function() { $('.top').flickity('resize'); $('body').removeClass('resizing'); }, 400); -})
\ No newline at end of file +}) |
