var menu = new Ext.menu.Menu( { margin: '0 0 10 0', //defaults:{ // iconAlign: 'top' // <--- we change the icon position //}, floating: true, items: [{ text: 'buscar amigos', iconCls:'back', handler: function(){ alert('me apretaron'); } },{ text: 'regular item 2' },{ text: 'regular item 3' }] }); Ext.get("black_square").on("contextmenu",function(e,t) { e.stopEvent(); menu.showBy(t); return false; })
test Online:
http://jsfiddle.net/qGcHV/2/
test Online 2 (pasando Datos):
http://jsfiddle.net/qGcHV/5/
con jQuery:
http://jsfiddle.net/ric47121/GX7Yc/
http://scriptinside.blogspot.com.ar/2011/02/capturar-click-derecho-con-jquery.html
No hay comentarios:
Publicar un comentario