added js functionality to posts index
merging feature to develop