Make sure the "focus" parameter works also for the first image in the album.
This commit is contained in:
parent
12b91ab1ec
commit
22f10bd11b
1 changed files with 2 additions and 2 deletions
|
|
@ -81,7 +81,7 @@ $(document).ready(function() {
|
||||||
return captionElement.innerHTML;
|
return captionElement.innerHTML;
|
||||||
}
|
}
|
||||||
var selectedImg = window.location.search;
|
var selectedImg = window.location.search;
|
||||||
var selectedPos;
|
var selectedPos = undefined;
|
||||||
if (/^\?focus=/.test(selectedImg)) {
|
if (/^\?focus=/.test(selectedImg)) {
|
||||||
selectedImg = selectedImg.substring('?focus='.length);
|
selectedImg = selectedImg.substring('?focus='.length);
|
||||||
$("a.ss").each(function(index) {
|
$("a.ss").each(function(index) {
|
||||||
|
|
@ -98,7 +98,7 @@ $(document).ready(function() {
|
||||||
'easingOut' : 'easeOutQuad',
|
'easingOut' : 'easeOutQuad',
|
||||||
'titleFormat' : formatTitle
|
'titleFormat' : formatTitle
|
||||||
});
|
});
|
||||||
if (selectedPos) {
|
if (selectedPos !== undefined) {
|
||||||
$(gallery[selectedPos]).trigger('click');
|
$(gallery[selectedPos]).trigger('click');
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue