Javascript to go back and forth between details of an idea