The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Matching a numerical variable Reply To: Matching a numerical variable


It’s a nice idea but I think using svg here isn’t particularly suited. I’ve been working with it lately as well and noticed not all jQuery ‘commands’ work properly – and across browsers there’s a bit of difference too.

You could also use regular divs and simply use show() and hide() to create the particular digit. I would split the value for speed in two beforehand and use a switch statement to go through the numbers 0-9 and show/hide the segments.