Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Chen-Zhe/photo-grid.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Calmettes <guillaume.calmettes@gmail.com>2018-07-29 06:25:44 +0300
committerGuillaume Calmettes <guillaume.calmettes@gmail.com>2018-07-29 06:25:44 +0300
commit1ce51aff424151bfba325b0f8dbfbb23b9a0949b (patch)
treeaa1d423f731c1c61489422268a933df9e4885c35
parentb34f0cbe01b05b971aad0ec36b8bf2438c45b111 (diff)
correctly hide preview if item is the one being previewed
-rw-r--r--layouts/partials/scripts.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html
index 4c95802..d0d1427 100644
--- a/layouts/partials/scripts.html
+++ b/layouts/partials/scripts.html
@@ -213,7 +213,7 @@
} ).children( 'a' ).on( 'click', function(e) {
var $item = $( this ).parent();
- current === $item.index() ? hidePreview() : showPreview( $item );
+ current === Array.from($items).findIndex(d => d == $item[0]) ? hidePreview() : showPreview( $item );
return false;
} );