How I Built a SCORM eLearning Course with Just JavaScript and GSAP
What happens when you skip Storyline and Captivate and build a SCORM eLearning course with just JavaScript and GSAP? You get total creative control, tiny file sizes, and interaction types no template can match. Here is how I built a SCORM eLearning course with just JavaScript and GSAP, plus a companion practice calculator to keep learners sharp after completion.
By Nathan Stoker · Published Nov 8, 2026 · Updated Nov 10, 2026 · 12 min read

What if you could build a fully interactive SCORM course without Storyline, Captivate, or any rapid development tool at all? Just raw JavaScript, GSAP animations, and a zip file.
That is exactly what I did. I built a 10-minute Mental Math Shortcuts course from scratch using nothing but HTML, CSS, JavaScript, and GSAP. It packages as a SCORM 1.2 zip, plays on any LMS, tracks completion and scores, and includes 18 interactive slides with animated walkthroughs, drag-to-sort activities, timed challenges, and a memory card game.
Then I built a companion practice calculator so learners can keep sharpening those skills after the course ends. It now lives inside the course too, as a bonus slide after the completion screen.
In this post, I will walk you through how I built a SCORM eLearning course with just JavaScript and GSAP, why practice tools matter as much as the training itself, and how you can try both for free.
Update (November 10, 2026): A few readers tried the course with only a keyboard and found slides they could not finish without a mouse. They were right. I fixed it, replaced the download, and added a section near the end called Update: Making It Keyboard Accessible. The code samples in this post now match the new version. The practice calculator is now part of the course as well, as a final bonus slide.
Second update (same day): More feedback came in about the phone layout and the instructional design. I did a fuller review and fixed what it found. Details are in Second Pass: Phones, WCAG 2.2, and the ID Review below.
Why Skip the Rapid Development Tools?
I want to be clear: I love Articulate Storyline. I use it daily. But this project started as an experiment. Could I build something with the polish and interactivity of a Storyline course using only web technologies?
The answer is yes, with tradeoffs. Here is what a pure JavaScript approach gives you:
Total control over every pixel, animation, and interaction. No platform limitations on what you can build. A tiny file size (the entire course is under 100KB). The ability to version control everything in Git. And the flexibility to create interaction types that don't exist in any authoring tool's template library.
The tradeoff is that you are responsible for everything. Accessibility, responsive layout, SCORM communication, slide management, state tracking. Storyline handles all of that for you. This approach is for developers who want maximum creative control.
I learned that the hard way. My first release worked great with a mouse and locked keyboard users out of three activities. More on that below.
The Course Architecture
The course is structured as six files plus a SCORM manifest:
mental-math-course/
├── imsmanifest.xml ← SCORM 1.2 package manifest
├── index.html ← Course shell (header, slide area, nav)
├── css/styles.css ← All visual styling
├── js/scorm.js ← SCORM 1.2 API wrapper
├── js/slides.js ← All 19 slide templates + interaction logic
├── js/calculator.js ← Practice calculator (slide 19)
└── js/app.js ← Navigation, scoring, progress, lifecycle
Each file has a single responsibility. The HTML is a thin shell with a header, a slide area, and a nav bar. The app controller handles navigation, scoring, and the slide lifecycle. Each slide is a self-contained object with its own HTML template and init function.
The Slide Definition Pattern
Every slide follows the same structure. This makes it easy to add, remove, or reorder content:
const slide03_round_teach = {
id: 'round-teach',
html: `
<div class="slide-inner">
<span class="strategy-badge round">🎯 Strategy 1 — Round & Adjust</span>
<p class="slide-subtitle">When a number is close to a friendly number,
round it, multiply, then adjust.</p>
<div class="math-display" id="s3-math">29 × 6 = ?</div>
<div id="s3-steps">
<div class="math-step" id="s3-a" style="opacity:0;">
<span class="label">Think</span><span>29 is close to 30…</span>
</div>
<!-- more steps -->
</div>
</div>`,
init(slide, ctx) {
const tl = ctx.gsap.timeline({ defaults: { ease: 'power3.out' }, delay: 0.3 });
tl.to('#s3-a', { opacity: 1, duration: 0.4 })
.to('#s3-b', { opacity: 1, duration: 0.4 }, '+=0.4')
.to('#s3-c', { opacity: 1, duration: 0.4 }, '+=0.4');
}
};
The init function receives a context object with GSAP, navigation helpers, and scoring methods. This keeps each slide isolated while still communicating with the course controller.
The SCORM 1.2 Wrapper
The SCORM integration is lightweight. The wrapper finds the LMS API by walking up the window chain (standard SCORM 1.2 pattern), then exposes simple methods:
const ScormAPI = (() => {
let api = null;
let initialized = false;
function findAPI(win) {
let attempts = 0;
while (win && !win.API && attempts < 10) {
if (win.parent && win.parent !== win) {
win = win.parent;
} else if (win.opener) {
win = win.opener;
} else {
break;
}
attempts++;
}
return win?.API || null;
}
return {
init() {
const scormApi = findAPI(window);
if (scormApi) {
scormApi.LMSInitialize('');
scormApi.LMSSetValue('cmi.core.lesson_status', 'incomplete');
scormApi.LMSCommit('');
}
},
setScore(score) { /* ... */ },
setComplete() { /* ... */ },
setLocation(loc) { /* ... */ },
finish() { /* ... */ }
};
})();
The course uses cmi.core.lesson_location for bookmarking, cmi.core.score.raw for scoring, cmi.suspend_data for state persistence, and cmi.core.lesson_status for completion. When the learner finishes, LMSFinish fires on beforeunload.
If no LMS is detected, the course runs standalone with a console message. No errors, no broken experience.
What the Course Teaches
The course covers five mental math strategies across 18 slides:
Multiplication strategies: 🎯 Round & Adjust (round to a friendly number, multiply, correct the difference), ✂️ Break Apart (split one factor by place value, multiply each piece, add), and ⚖️ Double & Halve (halve the even factor, double the other).
Division strategies: 🧩 Factor Out (break the divisor into smaller factors, divide step by step) and 🔄 Think Backwards (use multiplication facts in reverse).
Each strategy follows a teach, try, practice progression. Animated walkthroughs show the thinking step by step with GSAP timelines. Interactive exercises let learners build solutions themselves. Knowledge checks reinforce strategy selection.
The Interactions
This is where skipping the authoring tool actually shines. Without template constraints, I could build exactly the interaction each concept needed.
Click-to-Place (Slide 4)
Learners select answer chips and click drop zones to build a step-by-step solution. The zones validate against expected answers and show targeted feedback. Every zone is also a keyboard target, so a learner can Tab to a chip, press Enter, Tab to a zone, and press Enter again:
makeKeyButton(z, `${z.dataset.name}, empty`);
z.addEventListener('click', () => {
if (!selectedBtn) {
ctx.showFeedback('s4-feedback', 'Select an answer first, then choose a step.', 'info');
return;
}
if (selectedBtn.dataset.id === z.dataset.correct) {
contentEl.textContent = selectedBtn.textContent;
z.classList.add('correct');
z.setAttribute('aria-label', `${z.dataset.name}: ${selectedBtn.textContent}, correct`);
selectedBtn.disabled = true; // placed chips leave the Tab order
checkComplete();
} else {
z.classList.add('incorrect', 'animate-shake');
ctx.showFeedback('s4-feedback',
'Not quite. Think about what 48 rounds to.', 'incorrect');
}
});
Double & Halve Manipulative (Slide 9)
Learners click buttons to double or halve each factor, watching the numbers transform in real time until the problem becomes trivially easy:
document.getElementById('s9-dblA').onclick = () => {
if (!solved) { a *= 2; b /= 2; update(); }
};
When either factor becomes a round number or single digit, a "I see it!" button appears. This mirrors the mental experience of recognizing when a problem has become simple enough to solve in your head.
Memory Match Game (Slide 14)
A flip-card matching game pairs division problems with their multiplication twins (96 ÷ 8 matches 8 × 12 = 96). A timer tracks speed. This reinforces the Think Backwards strategy by making learners connect division and multiplication facts physically.
Each card is a Tab stop. Enter or Space turns it over, and a hidden status message tells screen reader users what they turned over and whether it matched.
Strategy Sorting (Slide 15)
Learners click problems to select them, then click the correct strategy bin. Keyboard users do the same thing with Enter: once on a problem, once on a bin. Wrong answers trigger a shake animation and a hint. This tests strategy identification, not just calculation.
Timed Final Challenge (Slide 17)
Four problems, 60 seconds, type your answers. The timer changes color as time runs low. After submission, each problem shows the recommended strategy. A Pause timer button lets anyone stop the clock, and Enter moves from one answer to the next. This is the capstone that ties everything together.
GSAP Animations: The Secret Sauce
GSAP makes this course feel like a real authoring tool built it. Every teach slide uses a GSAP timeline to reveal steps sequentially:
const tl = ctx.gsap.timeline({
defaults: { ease: 'power3.out' },
delay: 0.3
});
tl.to('#s6-a', { opacity: 1, duration: 0.4 })
.to('#s6-b', { opacity: 1, duration: 0.4 }, '+=0.3')
.to('#s6-c', { opacity: 1, duration: 0.4 }, '+=0.3')
.to('#s6-d', { opacity: 1, duration: 0.4 }, '+=0.3');
Strategy cards on the overview slide stagger in. The trophy on the completion slide rotates continuously. Feedback messages animate into view. These small touches add up to a polished learning experience.
Why Practice After the Course Matters
Here is the part most course developers skip.
A 10-minute course can introduce five strategies. It can walk learners through examples, let them try a few problems, and quiz them on strategy selection. But it cannot build fluency. Fluency comes from repeated practice over time.
Research on skill acquisition is clear: spaced practice beats massed practice. A learner who completes the course and then practices three problems a day for two weeks will retain far more than someone who completes the course and never thinks about it again.
This is the gap between "I understand the concept" and "I can actually do this." Understanding that 29 × 6 can be solved as (30 × 6) − 6 is one thing. Recognizing, mid-conversation, that the tip on a $48 dinner is a Round & Adjust problem, that takes practice.
The Companion Practice Calculator
To bridge that gap, I built a companion tool: the Mental Math Breakdown Calculator. You type any arithmetic problem and it shows you the best strategy from the course, with step-by-step thinking you can follow in your head.
The calculator is also built into the course now. After the completion screen, a Keep practicing button opens it as slide 19, so learners can keep going without leaving the LMS. It works fully from the keyboard: type a problem and press Enter, use the on-screen keypad, and move between strategy tabs with the arrow keys. Completion and scoring still happen on slide 18, so the extra slide never affects the SCORM results.
The calculator uses the same five strategies the course teaches: 🎯 Round & Adjust, ✂️ Break Apart, ⚖️ Double & Halve, 🧩 Factor Out, and 🔄 Think Backwards. For addition and subtraction, it adds Round & Compensate and Place Value strategies.
Smart Strategy Selection
The calculator does not just pick one approach. It analyzes the problem and identifies every applicable strategy, then flags the best one. For 25 × 12, it shows Double & Halve as the best strategy (halve 12, double 25, solve 50 × 6 = 300) while also offering Break Apart and Round & Adjust as alternatives.
Learners can click between strategy tabs to see the same problem solved multiple ways. This reinforces the course lesson that multiple strategies often work, and teaches learners to recognize which one is most efficient.
The Thought-Bubble Step Format
Instead of numbered instructions, the calculator models the inner monologue of solving in your head. Italic "think" steps show the reasoning ("29 is close to 30..."). Bold "calc" steps show the math. A final "result" step confirms the answer. Each step animates in sequentially.
Every strategy also includes a "Why does this work?" explanation that matches the course teaching.
Built for Mobile
The calculator uses an on-screen keypad rather than relying on the device keyboard. Number keys, four operators, clear, backspace, and a "Break it down" button are all right there. Desktop users can also just type normally. Quick-try example chips from the course (29 × 6, 48 × 5, 25 × 12, 144 ÷ 12) let learners jump straight to practice.
Update: Making It Keyboard Accessible
After this post went out, readers reported that the course did not work with a keyboard on every slide. Here is what was wrong. The drop zones on slide 4, the cards on slide 14, and the bins on slide 15 were plain div elements with click handlers. A mouse can click a div, but the Tab key skips right past it, so those activities could not be finished.
Two quieter problems showed up during testing. The arrow keys changed slides even while a learner was typing in a number field. And every time someone pressed Next, focus dropped back to the top of the page, so keyboard users had to Tab through the header again on every slide.
Give Every Click Target a Keyboard Path
A real <button> is always the first choice, and the nav dots are real buttons now. The bins were trickier, because sorted problems get placed inside them and a button cannot hold other buttons. For the zones, cards, and bins I added one small helper:
function makeKeyButton(el, label) {
el.setAttribute('tabindex', '0');
el.setAttribute('role', 'button');
if (label) el.setAttribute('aria-label', label);
el.addEventListener('keydown', e => {
if (e.key === 'Enter' || e.key === ' ') {
e.preventDefault();
el.click();
}
});
}
Because Enter and Space just fire the existing click handler, none of the game logic had to change.
Let Form Fields Keep Their Arrow Keys
The global arrow-key navigation now steps aside whenever focus is in a field:
document.addEventListener('keydown', e => {
if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) return;
const tag = e.target.tagName;
if (tag === 'INPUT' || tag === 'TEXTAREA' || tag === 'SELECT') return;
if (e.key === 'ArrowRight' || e.key === 'PageDown') nextBtn.click();
if (e.key === 'ArrowLeft' || e.key === 'PageUp') prevBtn.click();
});
Put Focus Somewhere Useful
When a slide renders, the button the learner just pressed is destroyed. So the app controller moves focus to the new slide and announces its title through a hidden live region:
slideEl.setAttribute('tabindex', '-1');
slideEl.focus({ preventScroll: true });
srStatus.textContent = `Slide ${index + 1} of ${SlideDefs.length}: ${title}`;
The same idea shows up inside the activities. After a correct placement on slide 4, focus goes back to the remaining chips. After you choose a split on slide 7, focus jumps into the first answer field. After you submit the final challenge, focus lands on your results.
Let Learners Stop the Clock
The 60-second final challenge now has a Pause timer button. WCAG 2.2.1 asks for a way to turn off, adjust, or extend time limits, and a learner moving through fields with a keyboard or a screen reader needs that time more than anyone.
Test It Without a Mouse
The fix that matters most is the habit. Before you ship, put the mouse away and finish every slide with Tab, Enter, Space, and typing. I also scripted that run with Playwright so it can be repeated after every change. The updated package passes all 48 keyboard checks, from the title slide to the practice calculator.
Second Pass: Phones, WCAG 2.2, and the ID Review
Keyboard testing alone was not enough. A reader with an instructional design background pointed out more problems, and he was right. So I reviewed every slide three ways: at phone size, with an automated axe-core scan for WCAG 2.2 AA, and as an ID would, asking whether each slide actually helps someone learn.
On phones, the nav bar with 19 slide dots was wider than the screen. Tapping Next scrolled the whole course sideways, so every slide after the first was cut off on the left. The dots now hide on small screens (the slide counter in the header covers that job), the buttons are bigger, and a "More below" cue shows up when a slide scrolls.
The scan found low-contrast white text on the blue buttons, tiny 9px labels, nav dots smaller than the 24px touch target WCAG 2.2 asks for, and slides that scrolled but could not be scrolled with a keyboard. Emoji icons were also being read aloud by screen readers ("direct hit, Round and Adjust"). All fixed, and the scan now comes back clean on all 19 slides at both desktop and phone sizes.
The ID problems mattered most:
Practice was graded. Every activity added points, and going Back to redo one added them again, so scores could pass 100%. Now only the two checkpoints and the final challenge count, scored on the first attempt. Practice is free to explore.
It celebrated too early. A "You Did It!" slide came before the final challenge. That slide is now a Quick Recap with a cue for when to use each strategy.
Feedback ignored performance. Everyone was called a "Mental Math Ninja." The last slide now shows the score, says whether you passed, and lists exactly what to review.
No objectives. The overview now says what you will be able to do, what you need to know first, and what is scored.
Generic wrong-answer feedback. Hints now point at the step you missed, and teaching slides have a Replay button so learners control the pace.
The lesson for me: a developer testing a course is not the same as an ID reviewing it. Get both before you ship.
How I Built a SCORM eLearning Course: Key Takeaways
Building a SCORM course with just JavaScript and GSAP is absolutely possible. It gives you total creative control, tiny file sizes, and interaction types no template library can match. The tradeoffs are real: you own every line of accessibility, responsiveness, and LMS communication code.
If you want to try this approach, here is what I would recommend. Start with the architecture: a thin HTML shell, a SCORM wrapper, a slide definition pattern, and an app controller. Use GSAP for all animations. Keep each slide self-contained with its own HTML and init function. Test on your LMS early, test every slide with only a keyboard and on a phone, and have an instructional designer review it before you call it done.
And build a practice tool. The course teaches the strategies. The tool helps learners actually use them. Together, they close the gap between knowledge and skill.
Try the Course and the Calculator →
Download the SCORM Course Package →
Nathan Stoker
I build custom eLearning in Storyline, Rise and JavaScript, and I make the free tools and templates on this site. Need an interaction like this in your course? Let's talk.