javascript - jQuery Context Menu Not Working -


i'm trying make custom right-click (context) menu website, title says i'm failing completely. jsfiddle example of code: http://jsfiddle.net/rb49h/

$(document).ready(function () {     // context menu :p     $context = $("#contextmenu");     $(document).bind("contextmenu", function(e) {         e.preventdefault();         $context.fadeout(300);         settimeout(function () {             $context.css({top: e.pagey + "px", left: e.pagex + "px"});             $context.fadein(300);         }, 301);     });     $(document).bind("click", function (e) {         if (!$(e.target).is("#contextmenu")) {             $context.fadeout(300);         }     }); }); 

bootstrap setting .dropdown-menu display:none default. if override that, works:

http://jsfiddle.net/fr4f9/

.dropdown-menu {     display:block; } 

(as side note, don't care 300 ms delay. makes feel unresponsive , laggy).


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -