In the following code, I'm working on a simple timer in JS. The problem is that the resulting code only shows one set of divider colons.
var divider = $('<span>').addClass('divider').text(':');
stopwatchFace = stopwatchFace.append(timeHour).append(divider)
.append(timeMin).append(divider).append(timeSec);
Is there a reason why the first one isn't being picked up? Should I be explicitly defining a divider1 and a divider2 object?
jQuery.fn.append()appends all parameters that it receives.. so you can use something like:stopwatchFace.append(timeHour, divider, timeMin, divider.clone(),timeSec);