Clear scripts as a button and maintaining position after click