Context menu support for both desktop and touch devices
don't make function within a loop