Updates js to right align element