123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>jquery.pep demo - disabling</title>
- <!-- Load local jQuery. -->
- <script src="../libs/jquery/jquery.js"></script>
- <script src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>
- <!-- Load local lib and tests. -->
- <script src="../src/jquery.pep.js"></script>
- <script type="text/javascript">
- $(document).ready(function(){
- $('.toggle').bind("click touchstart", function(ev){
- $(this).parent()
- .toggleClass('disabled')
- .data('plugin_pep')
- .toggle();
- });
- $('.pep').pep({
- debug: true,
- elementsWithInteraction: 'button'
- });
- });
- </script>
- <style type="text/css">
- .pep{ width: 200px; height: 200px; background: blue; opacity: 0.6; }
- .pep.disabled{ background: #eee; }
- .pep-1 { position: absolute; top: 10px; left: 10px; }
- .pep-2 { position: absolute; top: 60px; left: 50px; }
- .pep-3 { position: absolute; top: 110px; left: 90px; }
- .pep-4 { position: absolute; top: 160px; left: 130px; }
- </style>
- </head>
- <body>
- <div class="pep pep-1">
- <button class="toggle">Toggle</button>
- </div>
- <div class="pep pep-2">
- <button class="toggle">Toggle</button>
- </div>
- <div class="pep pep-3">
- <button class="toggle">Toggle</button>
- </div>
- <div class="pep pep-4">
- <button class="toggle">Toggle</button>
- </div>
- </body>
- </html>
|