Weebly Tricks #84 — ClassyCountdown Timer
Add a clean countdown timer to your Weebly site, created by Marius Stanciu.
Learn how to customize and modify your Weebly site with new effects, plugins, and widgets.
Welcome to My Weebly Tricks, a resource for Weebly site owners who want to go beyond the basics. Here you'll find step-by-step guides on adding image effects, slideshows, navigation scripts, text animations, countdown timers, and more — all tailored for the Weebly platform.
A custom cursor can give a Weebly website a distinctive visual touch without changing its entire layout. A soft glow, animated ring or small trailing dot can make a portfolio, creative business site or personal blog feel more polished and memorable. Learn more about Czytanie W Plenerze Dlaczego Warto Zabrać Książkę Do Parku.
The effect is created with a small combination of CSS and JavaScript. CSS controls the cursor’s size, colour, movement and hover state, while JavaScript follows the visitor’s pointer and adds classes when the pointer passes over links or buttons.
A cursor effect should remain a supporting detail rather than the main feature of a page. It needs to load quickly, stay out of the way of content and disappear on phones and tablets, where visitors normally browse with touch. This is particularly important for Australian audiences, who may move between a desktop at work, a laptop at home and a mobile device while commuting through Sydney, Melbourne or Brisbane.
Start by deciding what the cursor should add to the experience. A portfolio might use a fine white ring that expands over project links, while a photography blog could use a muted circle that follows the pointer across dark images. A bright animated cursor may suit a gaming or music website, but it can look distracting on a professional service page.
Use colours already present in your brand palette. A cursor that repeats an accent colour from your buttons or logo usually feels more intentional than a random neon shade. Keep the shape simple: a small dot, a thin ring or a combination of both will generally look cleaner than a large graphic that covers text.
The site’s visitors should still be able to identify links, buttons and form controls immediately. The browser’s normal pointer gives people familiar feedback, so avoid replacing it with an effect that looks like a loading indicator or decorative sticker. The visual change should reinforce interaction rather than make visitors guess what is clickable.
Consider how the effect fits with the way people use your site. An Australian café, trades business or local retailer may receive a large share of visits from mobile users checking opening hours, menus or booking details. Those visitors will never see a desktop cursor, so the essential information must remain clear without the animation.
The simplest installation method is to place the code in an Embed Code element. Open the relevant Weebly page, select Build, drag an Embed Code element into a suitable area and choose Edit Custom HTML. This approach is useful when you want the effect on one landing page or a single campaign.
For a site-wide effect, place the code in the footer area available under Weebly’s SEO or advanced site settings. The exact menu names can vary between Weebly accounts and themes, so preview the site after saving and publishing. A practical reference for wider Weebly customisation can also help when your dashboard presents different options.
Paste the following code into the chosen location:
<style>
.custom-cursor-dot,
.custom-cursor-ring {
position: fixed;
top: 0;
left: 0;
pointer-events: none;
z-index: 99999;
opacity: 0;
transform: translate3d(-50%, -50%, 0);
transition: opacity 180ms ease, transform 180ms ease;
}
.custom-cursor-dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: #f26b38;
}
.custom-cursor-ring {
width: 34px;
height: 34px;
border: 1px solid #f26b38;
border-radius: 50%;
transition:
width 180ms ease,
height 180ms ease,
opacity 180ms ease,
transform 180ms ease,
background 180ms ease;
}
html.custom-cursor-enabled,
html.custom-cursor-enabled body,
html.custom-cursor-enabled a,
html.custom-cursor-enabled button {
cursor: none;
}
.custom-cursor-ring.is-hovering {
width: 52px;
height: 52px;
background: rgba(242, 107, 56, 0.12);
}
@media (prefers-reduced-motion: reduce) {
.custom-cursor-dot,
.custom-cursor-ring {
transition: none;
}
.custom-cursor-ring.is-hovering {
width: 34px;
height: 34px;
}
}
</style>
<script>
(function () {
const desktopPointer = window.matchMedia(
'(hover: hover) and (pointer: fine)'
);
if (!desktopPointer.matches) return;
const dot = document.createElement('span');
const ring = document.createElement('span');
dot.className = 'custom-cursor-dot';
ring.className = 'custom-cursor-ring';
dot.setAttribute('aria-hidden', 'true');
ring.setAttribute('aria-hidden', 'true');
document.body.appendChild(dot);
document.body.appendChild(ring);
document.documentElement.classList.add('custom-cursor-enabled');
let ringX = 0;
let ringY = 0;
let pointerX = 0;
let pointerY = 0;
window.addEventListener('pointermove', function (event) {
pointerX = event.clientX;
pointerY = event.clientY;
dot.style.transform =
`translate3d(${pointerX}px, ${pointerY}px, 0) translate(-50%, -50%)`;
dot.style.opacity = '1';
ring.style.opacity = '1';
});
function animateRing() {
ringX += (pointerX - ringX) * 0.15;
ringY += (pointerY - ringY) * 0.15;
ring.style.transform =
`translate3d(${ringX}px, ${ringY}px, 0) translate(-50%, -50%)`;
requestAnimationFrame(animateRing);
}
document.addEventListener('pointerover', function (event) {
const interactive = event.target.closest(
'a, button, input, textarea, select, [role="button"]'
);
ring.classList.toggle('is-hovering', Boolean(interactive));
});
animateRing();
})();
</script>
This version creates a small orange dot and a slower ring. The ring expands over links, buttons and common form controls. Change #f26b38 to your brand colour, adjust the width and height values for a different scale, or remove the background from .is-hovering for a lighter effect.
The media query is important because it limits the effect to devices with a fine pointer, usually a desktop mouse or trackpad. It avoids adding unnecessary elements on iPhones, Android phones and tablets. Touch visitors can still scroll, tap and interact with the page normally.
The prefers-reduced-motion rule respects a visitor’s operating-system preference. When reduced motion is enabled, the ring stops expanding and the transitions are removed. This gives people who experience discomfort from movement a calmer version of the page.
A custom cursor must never replace keyboard focus. Visitors who use the Tab key should see a clear outline around links, buttons and form controls. Check that your theme has a visible focus style, and add one if needed:
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
outline: 3px solid #1d5f74;
outline-offset: 3px;
}
Do not rely on cursor colour alone to communicate a state. A hover effect may be invisible to keyboard and touch users, so links should also have an underline, colour change, border or other visible treatment. This supports practical accessibility expectations in Australia, including the broad responsibilities businesses may have under the Disability Discrimination Act 1992. It also aligns with the Web Content Accessibility Guidelines commonly used when reviewing public websites.
Keep the script free from analytics or visitor profiling. The code above only reads pointer movement in the browser and does not send that information anywhere. If you add third-party animation libraries, tracking scripts or external assets, review their privacy implications under the Australian Privacy Act and your site’s privacy policy.
Preview the page before publishing, then test it on Chrome, Safari, Edge and Firefox. Safari is especially worth checking if your audience includes MacBook and iPad users. Move the pointer over navigation menus, image links, buttons, embedded forms and pop-up elements to make sure the cursor stays above the page without blocking clicks.
The cursor elements use pointer-events: none, which allows clicks to pass through to the content below. Keep this property in place. Removing it can create an invisible layer that prevents buttons or links from working.
Look at the cursor against every major background colour. A pale ring can disappear over a white section, while a bright orange cursor may be difficult to see over a colourful hero image. A subtle shadow can improve visibility:
.custom-cursor-dot {
box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
}
.custom-cursor-ring {
box-shadow: 0 0 12px rgba(242, 107, 56, 0.3);
}
Keep the effect lightweight. Avoid loading a large animated image, video or external JavaScript library when two small CSS shapes can create the same result. The browser’s animation frame method gives the ring a smooth trailing movement, but you can remove the animation and position the ring directly if a low-power device struggles.
Test on a slower connection as well as fast NBN or office Wi-Fi. Australian visitors may access a site from regional areas, public transport or a busy shopping centre network. The cursor should never delay the appearance of the page’s core content, contact details or purchase controls.
Once the basic cursor works, adjust the timing to match the personality of the website. A quick ring can feel responsive and energetic; a slower ring creates a softer, more relaxed impression. The value 0.15 controls how quickly the ring catches up with the pointer. Try 0.22 for a tighter response or 0.1 for a longer trail.
You can also change the hover selector to target only the elements that need special treatment. For example, a photography site might expand the ring over gallery images as well as links:
const interactive = event.target.closest(
'a, button, input, textarea, select, [role="button"], .gallery-item'
);
If a Weebly theme uses a particular class for its call-to-action buttons, add that class to the selector. Inspect the element in your browser’s developer tools to identify the correct class, then test it after publishing because theme updates can change class names.
A cursor can support a visual story when paired with the right content. A gardening blog might use a green dot, while a site about slow weekends could use a gentle, low-contrast ring. For an editorial or outdoor theme, ideas about reading in the park may even inspire a calmer design direction built around natural colours and unhurried movement.
Avoid stacking too many effects. A cursor trail, animated background, scrolling text, moving buttons and auto-playing video can compete for attention and reduce readability. Choose one primary motion feature, then keep supporting animations restrained.
Before making the effect global, consider applying it only to a portfolio, campaign page or desktop-focused section. This gives you a controlled way to compare engagement, accessibility feedback and page performance. If visitors report confusion or the cursor distracts from forms and buying actions, remove it without affecting the site’s core structure.
Add the code, save a backup of the original version and publish only after checking the live page on both desktop and mobile. A well-tuned cursor effect can give a Weebly site extra character while leaving navigation, content and accessibility firmly in control. Consider adding a small, purposeful interaction today, then review the finished page with a mouse, keyboard and touch device before sending visitors to it.
Add a clean countdown timer to your Weebly site, created by Marius Stanciu.
A comparison of free and paid email accounts and the advantages of using a domain-based custom email.
Instructions on setting a free custom email address for your website within Weebly.
Configure your Weebly RSS feed so visitors can subscribe and receive email updates.
Details on a promotional offer for two months of free email hosting from Namecheap.
Subscribe for regular email updates and get access to new Weebly tips and tutorials.