improved JS to support adding event triggers on a post being added, and preventing multiple clicks of the submit button