A few weeks ago I showed you how easy it is to integrate jQuery into RAP using the browser widget. I’d like to show you another example of what can be integrated. Last time I created a carousel widget; this time the demo is something smaller but still really cool.
Yesterday I came across a github repository by Ryan McGeary. He has created a very clever jQuery plug-in called “timeago“. What this plug-in does is simple. It takes a timestamp and displays a text string instead of the stamp that describes the difference between the actual time and the one in the timestamp. We’ve all seen the messages, “about a minute ago.” The cool thing about this plug-in is that it refreshes automatically. I mean, it isn’t new to transform timestamps in this way, but it is usually done just once. So, when you visit a website in the morning and leave the tab open until evening, it still says something like, “The page was opened about minute ago” ;). This can’t happen with McGeary’s plug-in.
If you like this idea you can grab the sources at github. Of course this is just a demo. Let me know if you would like to work with me on an implementation for productive use. Have fun with timeago 😉