Made fadeOut in the top of javascript method.