Why I built this
I built this jargon translator because accounting letters, tax returns and HMRC correspondence are full of words that mean nothing outside the profession. Below you will find plain English explanations for the accounting and tax terms that come up most often.
' +
'
' +
'Plain English' +
'' + item.translation + '' +
'ClickTap to flip back' +
'
' +
'
';
function toggle() {
var f = card.classList.toggle('flipped');
card.setAttribute('aria-pressed', f ? 'true' : 'false');
}
card.addEventListener('click', toggle);
card.addEventListener('keydown', function(e) {
if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); toggle(); }
});
return card;
}
function renderGrid() {
grid.innerHTML = '';
var filtered = TERMS.filter(function(t) {
return t.term.toLowerCase().indexOf(query) !== -1 ||
t.translation.toLowerCase().indexOf(query) !== -1;
});
if (!filtered.length) {
var el = document.createElement('div');
el.className = 'jbjt-empty';
el.textContent = 'Not there yet. Request it below and I\'ll add it to the list.';
grid.appendChild(el);
return;
}
filtered.forEach(function(item) { grid.appendChild(makeCard(item)); });
}
searchBox.addEventListener('input', function() {
query = searchBox.value.trim().toLowerCase();
renderGrid();
});
renderGrid();
})();