Javascript simple floating and forever moving image

In this example, I will show you how to  animate an element and make it moving up and down infinitely. And I will do it without any explicit Loop construct (no for, while loops), with the help of the jQuery.



 How it works

In CSS, we set the element (the IMG) to absolute position so that it “float up” and detach from the normal layout. With this, we can move the image up and down by changing the “top” CSS property.

In Javascript, we define two functions, bannerMoveDown() and bannerMoveUp(). In each function, we use the jQuery animate() method to animate the IMG element, and after the each animation ends, we call the other one respectively, thus making it loop forever.

Finally, we call bannerMoveDown() to initiate the animation loop.

Fully functional example

Please checkout a fully function example here on JSFiddle:

Thanks for reading, Leave your comments down below if you encounter any problem!

Extremely slow installation of OSX 10.10 Yosemite

I was experiencing very lengthy install while upgrading my Mac mini 2011 from 10 find out here now.9 Mavericks to 10.10 Yosemite Developer Preview. The install process just appeared to hang at “5mins left”.

After some research, I believe that the cause of this is the MacTex library. If you have installed the MaxTex or any Tex library, you may experience this. The solution is just to wait, it may take a good couple of hours. Leave it overnight and it should be ready the next morning 🙂

Microsoft killed Free Custom Domain Email Service

Not long ago <a href="http://www like” target=”_blank”>Microsoft still provides a free Outlook Email service for custom domains (@[your domain].com) from this Windows Live Admin Console. Apparently Microsoft has no longer support this service, I’m not able create new accounts nor manage the existing accounts. While this is sort of expected, but I’m disappointed that Microsoft made this move without any notice.

According to this blog post, this was happened at around 11 April, 2014. Existing users are unable to login to the console. Users are advised to migrate to Office 365 which cost around $5 USD per month per user. Now I have to find an alternatives, as far as I know there’s only Zoho still provides free domain email service. I think I would choose Google over Outlook for paid Business email service. (which is also started from $5 USD price point).

Bad moves Microsoft. Bad moves…

Solving Genymotion “unable to connect to your virtual device” Error

So I know you are here because you get this error message while starting a Genymotion Device.


First you should go check your firewall settings as suggested in the Genymotion FAQ. Other than that, if the problem still persist, 9/10 it’s the problem of your Host-only adapter settings. Here’s how to correctly set it. Continue reading “Solving Genymotion “unable to connect to your virtual device” Error”

AngularJS minimal MVC example

Recently started to learn AngularJS, which is really a very good framework. It makes routes, Two way data binding and modular design easy.

I have created a minimal MVC example for beginners to get started with. This is a BMI calulator.

You can also try the jsFiddle here.

Convert Webp image to png under osx/linux

You can find the open source project here :

To build the tool from source

You can find the dwebp utility under “examples” folder

You can test it out using the test.webp in the same folder