Added code to show popup in position of clicked element