You have both `.popup_menu` and `#popup_menu`, and this doesn't look right. Secondly, we allow multiple plots so we shouldn't use any ids, unless this element is somehow shared between plots, but then, it needs explanation. Make sure to test your code in various scenarios, i.e. single plot, multiple plots one one page, grid plots, etc.