Skip to content
Snippets Groups Projects
Commit 11da3c9c authored by Rolf Niepraschk's avatar Rolf Niepraschk
Browse files

"getPageIndex" verbessert

parent c8ab7547
No related branches found
No related tags found
No related merge requests found
......@@ -162,7 +162,7 @@ define(['jquery'], function ($) {
function setPage(x) {
var $x = x;
if (typeof x == 'number') {
var $x = $($('#vl-menu').find('ul > li').get(x));
$x = $($('#vl-menu').find('ul > li').get(x));
}
if ($x.hasClass('hilit') || _lock) return;
$x.addClass('hilit').siblings().removeClass('hilit');
......@@ -174,7 +174,8 @@ define(['jquery'], function ($) {
}
function getPageIndex($x) {
return $('.vl-page').index($x.parents('.vl-page'));
return $('.vl-page').index(
$x.hasClass('.vl-page') ? $x : $x.parents('.vl-page'));
}
function showOverlay($x) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment