I can link from one page (startpage) to a fancybox slide-show on a different page (secondpage) and run it with the link "page1.html#SlideShow1-1" The fancybox slideshow will open immediately. But how can I manage to go back automaticaly to the first page (startpage) when the fancybox is closed...?
This does not help
<script>
$(".fancybox-button fancybox-button--close" ).click(function() {
var url = "index.html";
$(location).attr('href',url);
});
</script>
Help needed for fancybox ***SOLVED***
Forum rules
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/publish.html
http://www.wysiwygwebbuilder.com/preview.html
Frequently Asked Questions about Publishing
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/publish.html
http://www.wysiwygwebbuilder.com/preview.html
Frequently Asked Questions about Publishing
Help needed for fancybox ***SOLVED***
Last edited by presto on Wed Jun 05, 2019 12:18 pm, edited 1 time in total.
Re: Help needed for fancybox ***SOLVED***
Meanwhile I have found the solution myself:
<script>
$(document).on('beforeClose.fb', function( e, instance, slide ) {
var url = "index.html";
$(location).attr('href',url);
});
</script>
<script>
$(document).on('beforeClose.fb', function( e, instance, slide ) {
var url = "index.html";
$(location).attr('href',url);
});
</script>
Re: Help needed for fancybox ***SOLVED***
or as part of the document-fancybox commands
Code: Select all
afterClose: function(){
parent.location.href = "YourParentPage.html";
},
Re: Help needed for fancybox ***SOLVED***
Thanks a lot, works fine.Simply inserted as is in "Slide Show - General - Settings".rogerl wrote: ↑Thu Jun 06, 2019 1:30 pm or as part of the document-fancybox commandsCode: Select all
afterClose: function(){ parent.location.href = "YourParentPage.html"; },