2d3c1a4f821f7d57d37e725398adb48f59e715f7.svn-base 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Custom Menu Item - jQuery EasyUI Demo</title>
  6. <link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
  7. <link rel="stylesheet" type="text/css" href="../../themes/icon.css">
  8. <link rel="stylesheet" type="text/css" href="../demo.css">
  9. <script type="text/javascript" src="../../jquery.min.js"></script>
  10. <script type="text/javascript" src="../../jquery.easyui.min.js"></script>
  11. </head>
  12. <body>
  13. <h2>Custom Menu Item</h2>
  14. <p>Right click on page to display menu, move to the 'Open' item to display its custom sub content.</p>
  15. <div style="margin:20px 0;"></div>
  16. <div id="mm" class="easyui-menu" style="width:120px;">
  17. <div>New</div>
  18. <div>
  19. <span>Open</span>
  20. <div class="menu-content" style="text-align:left;padding:10px">
  21. <div style="font-weight:bold;font-size:16px">Select your Language:</div>
  22. <ul style="margin:0;padding:0 0 0 40px">
  23. <li><a href="javascript:void(0)">Java</a></li>
  24. <li><a href="javascript:void(0)">Basic</a></li>
  25. <li><a href="javascript:void(0)">C++</a></li>
  26. <li><a href="javascript:void(0)">Fortran</a></li>
  27. <li>
  28. <span>Other</span>
  29. <input>
  30. </li>
  31. </ul>
  32. <div style="padding:10px 0 0 30px">
  33. <a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-ok'">Ok</a>
  34. </div>
  35. </div>
  36. </div>
  37. <div data-options="iconCls:'icon-save'">Save</div>
  38. <div data-options="iconCls:'icon-print'">Print</div>
  39. <div class="menu-sep"></div>
  40. <div>Exit</div>
  41. </div>
  42. <script>
  43. $(function(){
  44. $(document).bind('contextmenu',function(e){
  45. e.preventDefault();
  46. $('#mm').menu('show', {
  47. left: e.pageX,
  48. top: e.pageY
  49. });
  50. });
  51. });
  52. </script>
  53. </body>
  54. </html>