开发者

Highlighting DIV element at certain times using PHP?

I have a radio station site done in PHP, as mentioned at Displaying strtotime() effectively in MySQL/PHP query.

It's working now (new code at http://pastebin.com/TyB2v18R), b开发者_开发百科ut only one issue needs to be done:

http://pastebin.com/ZPj1uJFx

(this is how I think it should render at certain times of the day).

My schedule has shows at the following times:

01:00

06:00

08:00

12:00

16:00

19:00

22:00

What should I do to get it to highlight it at these specific times in this script? Is ifelse the solution?

Thank you for your help, learning a lot and getting it working too!


when generating the HTML, add a CSS class to the times that should be highlighted.


What should I do to get it to highlight it at these specific times in this script? Is ifelse the solution?

To get hightlighting at these specified times you could use CSS pseudo class at those times

Your HTML would something like this:

<div class="hightlight">Hello World</div>

Your CSS would look something like

.hightlight {
  color: yellow;
}

With this cide you would hightlight the div "Hello World" yellow.

You could see this jsfiddle for example => http://jsfiddle.net/YdtBr/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜