some javascript code motion