Wrapped the clickHandler in a function to allow dynamic post loading