Skip to content

Instantly share code, notes, and snippets.

@robertbiswas
robertbiswas / gist:f5e61dae932a408f0aacef21bc00bc27
Last active July 13, 2023 18:45
Elementor Kit overflow X scroll issue fix CSS
html {
height: 100%;
overflow: hidden;
}
body {
margin: 0;
width: 100vw;
height: 100%;
overflow-y: auto;
@robertbiswas
robertbiswas / rb-glightbox.js
Created June 12, 2024 20:43
Glightbox Opens one at a time fix
const lightbox = GLightbox()
const allLightboxTriggers = document.querySelectorAll('.lightbox-trigger')
if (allLightboxTriggers) {
allLightboxTriggers.forEach(function(trigger) {
trigger.addEventListener('click', function(e) {
e.preventDefault()
let targetHref = this.getAttribute('href')
lightbox.setElements([{'href': targetHref}])
lightbox.open()
})