Dynamic Clear Field buttons

Has anyone had any luck with a clear field button the appears after user starts typing? Is there any custom directives out that would work for this?