I tested the script, and although it didn't produced the expected results, it did make a difference... maybe JavaScript wasn't enabled in your browser when you tested? Anyway, here's a simpler script that produces the correct results: <div id="timeLeft">$(session-time-left)</div> <script ...