SHARE
TWEET

Untitled

a guest Feb 24th, 2017 136 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2. <html>
  3.   <head>
  4.     <!-- Your other stuff  (you can have problems if you don't add minimum scale in the viewport) -->
  5.     <meta name="viewport" content="width=device-width,minimum-scale=1" />
  6.     <!-- Include a Sidr bundled CSS theme -->
  7.     <link rel="stylesheet" href="http://cdn.jsdelivr.net/jquery.sidr/2.2.1/stylesheets/jquery.sidr.dark.min.css">
  8.     <link rel="stylesheet" href="jquery.mobile/jquery.mobile-1.4.5.min.css">
  9.     <style>
  10. #mobile-header {
  11.     display: none;
  12. }
  13. @media only screen and (max-width: 767px){
  14.     #mobile-header {
  15.         display: block;
  16.     }
  17. }
  18. </style>
  19.   </head><body>
  20.       <script src="http://cdn.jsdelivr.net/jquery/2.2.0/jquery.min.js"></script>
  21.       <script src="jquery.mobile/jquery.mobile-1.4.5.min.js"></script>
  22.     <!-- Include the Sidr JS -->
  23.     <script src="http://cdn.jsdelivr.net/jquery.sidr/2.2.1/jquery.sidr.min.js"></script>
  24.  
  25.  
  26. <div id="mobile-header">
  27.     <a id="responsive-menu-button" href="#sidr-main">Menu</a>
  28. </div>
  29.  
  30. <div id="navigation" style="display: none;">
  31.     <nav id="navtag" class="nav">
  32. <button id="menu" class="but" data-theme="a" title="test" data-role="button">Button</button>
  33.  
  34. </nav>
  35. </div>
  36. <script type="text/javascript">
  37. //$(document).ready ( function () {
  38. document.addEventListener('DOMContentLoaded', function() {
  39.    // ...
  40.  
  41.          $( "#navigation " ).click(function()
  42.         {
  43.             alert( "Handler for .click() called." );
  44.         });
  45.         $('#responsive-menu-button').sidr(
  46.         {
  47.           name: 'sidr-main',
  48.           source: '#navigation'
  49.         });
  50.  
  51.         console.log($('#navigation >#navtag>#menu').prop('title'));
  52.         $('#navigation >#navtag>#menu').click(function()
  53.         {
  54.             alert("H");
  55.         });
  56. //});
  57. });
  58. </script>
  59.   </body>
  60. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top