Same code, different results


I had a script for a clock, that gave the time in various cities worldwide in

and for a new page decided to strip it of some code.

I put it in one page (Barcelona) and it works fine

With that same modified code html/css I put it on another page (Punta Cana) and it does not work.

As my knowledge of javascript is close to nil, I wonder if you couls tell me what is wrong.

I suspect that there must be a way for the script to know which city is involved but I cannot see that anywhere, old or new.

This line

<div id="Punta-Cana" class="time"></div>

needs to be

<div id="Punta-Cana" class="cityTimeDate"></div>

The js is looking for that class to hook to…

1 Like

It’s nice to know…

Many thanks. One more problem solved.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.