jakiestfu/Context.js — pull request #10 by zebfross (2014-08-02 15:33:14+00:00)
Title: Speed Improvements

I really like this context menu solution, and I wanted to use it for thousands of context menus on a page. When there are that many menus, I discovered a bit of page lag.

Here is a fiddle to demo the lag and the fix: http://jsfiddle.net/zebfross/N2e9x/14/

The fix for page lag was in context.initialize; I changed ".dropdown-context" to ".dropdown-context:visible". The speed of building the menus can be improved substantially by using native DOM manipulation instead of jQuery.