Images Not Loading
-
Hi ,
When I change the direction in the html element to “rtl” using this js code
function checkLanguage(){
if(document.documentElement.classList.contains("translated-rtl")){
document.documentElement.setAttribute("dir", "rtl");
}else{
document.documentElement.setAttribute("dir", "ltr");
} ;
};
checkLanguage();
/*change direction for a language accordingly*/
// Select the element to observe
const targetElement = document.documentElement;
// Create a MutationObserver instance
const observer = new MutationObserver((mutations) => {
mutations.forEach((mutation) => {
if (mutation.attributeName === "class") {
checkLanguage();
}
});
});
// Configuration options for the observer
const config = {
attributes: true, // Observe attribute changes
attributeFilter: ["class"], // Only observe the "class" attribute
};
// Start observing the target element
observer.observe(targetElement, config);2 of my hero section images in home page are not loading , I cannot understand what is causing this…
Thanks in advance!The page I need help with: [log in to see the link]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.