Fancybox 3 uses the hashtag to persist the current view in the URL:
However, this is too bad for a site where navigation already requires hashtags:
Fancybox 3 will replace this to
Is there a way to use both this navigation and Fancybox 3 at the same time?
Fancybox 3 uses the hashtag to persist the current view in the URL:
http://example./sites/site1#gallery-1
However, this is too bad for a site where navigation already requires hashtags:
http://example./#/sites/site1
Fancybox 3 will replace this to
http://example./#gallery1
Is there a way to use both this navigation and Fancybox 3 at the same time?
Share Improve this question asked May 7, 2017 at 14:37 bytecode77bytecode77 14.9k31 gold badges117 silver badges149 bronze badges2 Answers
Reset to default 6It seems like Fancyapps anticipated this and added an option for it that works smoothly:
$.fancybox.defaults.hash = false;
Well, it is kinda impossible to have two hashes at the same time, therefore fancyBox replaces with gallery hash, but restores original after closing. If this is causing trouble for you, then yes, disabling hash module would be best option.
btw, you can use gulp to build your own fancybox.js file without hash module; or you can pass hash: false
option to disable (from v3.1).