--- currentMenu: runtime-options --- # Runtime options (opt) - [$node](#node) - [$input](#input) - [$label](#label) - [$menu](#menu) - [$trigger](#trigger) - [callbacks](#callbacks) - [commands](#commands) - [inputs](#inputs) - [hasTypes](#hastypes) - [ns](#ns) The runtime options are passed to most callbacks on registration. This gives you the ability to access DOM elemnts and configuration dynamicly. One way of using these in in the general [callback](#callback) when an item is clicked. #### Example ```javascript $.contextMenu({ selector: 'span.context-menu', items : { name: "textfield", type: "text", value: "welcome!" }, callback: function(itemKey, opt){ // Alert the classes on the item that was clicked. alert(opt.$node.attr('class')); // Alert "welcome!" alert(opt.inputs[itemsKey].$input.val()); } }); ``` ### $selected Reference to the `
  • ` command element. `$selected`: `jQuery element` ### $input Reference to the `` or ``: `opt.inputs[key].$input` `inputs`: `jQuery element` ### hasTypes flag denoting if the menu contains input elements. `hasTypes`: `jQuery element` ### ns The namespace (including leading dot) all events for this contextMenu instance were registered under. `ns`: `string`