diff options
-rw-r--r-- | layouts/partials/scripts.html | 2 |
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; } ); |