Home › Forums › JavaScript › Matching a numerical variable › Reply To: Matching a numerical variable
December 2, 2014 at 8:45 pm
#189815
Shikkediel
Participant
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.