I want to display time on my page in real tics format like running on simple watch without
refresh the whole page.I am using rails 3.Give any idea
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes interesting situation I think you should put your portion of display time in some partial and refresh it with jquery ajax call. So you need to refresh it with every second and also you can set frequency of that ajax call. Here is some code may be it help you.
Html code:
Code of partial of time_portion. It just shows time.
Controller code:
And refresh this partial by jquery ajax call and I set frequency of it for one second and you can change.