Hi,
I copied your code and it works for me, not sure why it is not working for me.
Do you have a WinJS.UI.ProcessAll() method ? That can be the issue, I can think of.
BTW you are replacing the class name. You can just remove the hidden. Also use the utilities class of WinJS + to add/remove class names.
Try this
HTML:
<div id="timer" class="showTime hidden">
<div id="timeDiv" data-win-control="WinJS.UI.TimePicker" data-win-options="{ clock : '24HourClock', current: '00:00:00'}" ></div>
<div id="timerName"><label for="label">Label</label><input type="text" id="label" /></div>
<div id="soundsList"><label for="listOfSounds">Sound</label><select id="listOfSounds"></select></div>
</div>
CSS :
.hidden {
display: none;
}
.showTime {
display: inline;
}
JS
WinJS.UI.processAll().then(
function() {
var timer = document.body.querySelector(".showTime");
WinJS.Utilities.removeClass(timer, "hidden");
});
- Girija