Advertisement
27GRiS

index.html

Jan 31st, 2014
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.39 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3.   <head>
  4.     <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
  5.     <script src="jquery.contextmenu.js"></script>
  6.     <link rel="stylesheet" href="jquery.contextmenu.css">
  7.     <link rel="stylesheet" href="localstyle.css">
  8.   </head>
  9.   <body>
  10.     <script type="text/javascript">
  11.  
  12.     /*
  13.     var itemIndex = 3; // which item (starting at 0)
  14.     $('.contextMenuPlugin > li:not(:nth-child(2))').get(itemIndex).css({backgroundColor: 'blue'})*/
  15.  
  16.     $(document).ready(function() {
  17.       $('#conf').hide();
  18.       $('#auth').hide();
  19.       $('#outer').click(function(){
  20.         $('#conf').fadeOut("slow");
  21.       });
  22.       $('#outer').click(function(){
  23.         $('#auth').fadeOut("slow");
  24.       });
  25.       $('#red').click(function(){
  26.         $('.contextMenuPlugin').css({'background-color': 'white'});
  27.       });
  28.  
  29.       $('#outer').contextPopup({
  30.         title: 'LETTERS',
  31.         items: [
  32.           {label:'A',     action:function() { alert('clicked A') } },
  33.           {label:'B',     action:function() { alert('clicked B') } },
  34.           {label:'COLOR', action:function() { $('#conf').fadeIn("slow"); } },
  35.           // null, // divider
  36.         ]
  37.       });
  38.     });
  39.     </script>
  40.       <div id="outer">
  41.         outer context menu
  42.         <div id="conf">
  43.           <div id="red">R</div>
  44.         </div>
  45.       </div>
  46.   </body>
  47. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement