灯箱式WordPress相册,自动打开弹出窗口

huangapple go评论60阅读模式
英文:

lightbox wordpress gallery open popup automatics

问题

I'm using the Gallery Lightbox Lite plugin in my website for gallery popup option but I want open popup automatics after page load, do you have any javascript help me for this ?

note: this is the link to gallery
https://www.360cdm.ae/milanoorchid/en/services/kitchens/

I mean when browse this page open the gallery automatics

Best regards

英文:

I'm using the Gallery Lightbox Lite plugin in my website for gallery popup option
but I want open popup automatics after page load, do you have any javascript help me for this ?

note: this is the link to gallery
https://www.360cdm.ae/milanoorchid/en/services/kitchens/

I mean when browse this page open the gallery automatics

Best regards

答案1

得分: 1

如果您正在使用 Fancybox5,它可以在页面加载时像这样启动:

Fancybox.fromNodes(Array.from(document.querySelectorAll('[data-fancybox="gallery"]')));

演示 - https://jsfiddle.net/kb72pct6/

英文:

If you were using Fancybox5, it could be started on page load like this:

Fancybox.fromNodes(Array.from(document.querySelectorAll('[data-fancybox="gallery"]')));

Demo - https://jsfiddle.net/kb72pct6/

huangapple
  • 本文由 发表于 2023年2月27日 16:54:53
  • 转载请务必保留本文链接:https://go.coder-hub.com/75578408.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定