Personalized checkout and custom promotions with Shopify Scripts
Hi, Im trying to add a fadeout as opposed to an abrupt ending to my preload screen. Can't get anything to work. Can anyone help?
<div id="preloader">
</div>
<script type="text/javascript">
(
function()
{
var preload = document.getElementById("preloader");
var isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);
var loading = 0;
var id = setInterval(frame, 30);
function frame()
{
if(loading == 70)
{
clearInterval(id);
}
else
{
loading = loading + 1;
if(! isMobile)
{
if(loading == 60)
{
preload.style.opacity = "0";
preload.style.display = "none";
}
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024