php - Time of day display -


i'm trying time of day script had long time ago working again, want add ajax scripting well. i'm sure i'm missing obvious or not completing fully. think missing more of code not sure were. here have:

date.js

<script type="text/javascript"> $(document).ready(function() {       var = new date();       var hours = now.gethours();       var msg;       if (hours < 07) msg = "good morning";       else if (hours < 12) msg = "good afternoon";       else if (hours < 18) msg = "good evening";       $('#time p').text(msg);     }); }); </script> 

could add

 <?php the_date(); echo "<br />"; ?> 

in location want display text , getting working again. if not , add output display text @ times? said i'm sure simple.


Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -