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:
-rw-r--r--layouts/partials/scripts.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html
index 93a33ef..4c95802 100644
--- a/layouts/partials/scripts.html
+++ b/layouts/partials/scripts.html
@@ -124,7 +124,7 @@
var Grid = (function() {
- var $grid = $( '#og-grid' ),
+ var $grid = $( '*#og-grid' ),
$items = $grid.children( 'li' ),
current = -1,
previewPos = -1,
@@ -260,7 +260,7 @@
function Preview( $item ) {
this.$item = $item;
- this.expandedIdx = this.$item.index();
+ this.expandedIdx = Array.from($items).findIndex(d => d == this.$item[0]);
this.create();
this.update();
}