Replies: 1 comment 1 reply
-
Hi, Well, do you really need that? The focus is already placed on the corresponding trigger element after closing Fancybox. Just make sure you are using the latest version! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi. In version 3.5 I've this code to, after close, focused last image viewed in FB and move to him.
afterClose: function(instance, current) {
$heightwin = $ (window).height()/2;
$heightelem = $ ('.img-responsive').height()/2;
$heightthis = $heightwin - $heightelem;
$(current.opts.$orig).focus();
$('html,body').animate({
//scrollTop: $(this.element).offset().top -150
//scrollTop:$(this.element).offset().top - $(window).height() / 2
scrollTop: $(current.opts.$orig).offset().top - $heightthis
}, 1000);
}
With v. 5 I've error on $(current.opts.$orig).focus();
Can you me show a link where I can try to resolve my code?
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions