git.fiddlerwoaroof.com
Browse code

Make sure the modal appears over other elements

Also, some debugging stuff.

Ed Langley authored on 07/03/2016 16:41:14
Showing 2 changed files
... ...
@@ -5,10 +5,13 @@
5 5
   left: 0px;
6 6
   height: 100%;
7 7
   width: 100%;
8
+  z-index: 999;
8 9
 }
10
+
9 11
 .myjQModal-wrapper {
10 12
   background: hsla(0,0%,25%,0.5);
11 13
 }
14
+
12 15
 .myjQModal-wrapper.open {
13 16
   display: block;
14 17
 }
... ...
@@ -15,7 +15,7 @@
15 15
       var action = this.dataset.action;
16 16
       var modal = $('<div></div>');
17 17
       var wrapper = $('<div class="myjQModal-wrapper"></div>').append(modal);
18
-      console.log(target);
18
+      //console.log(target);
19 19
       modal.append(target);
20 20
       modal.wrap('<div class="myjQModal">');
21 21
       $('body').append(wrapper);
... ...
@@ -48,6 +48,7 @@
48 48
       };
49 49
 
50 50
       $(this).click(function() {
51
+          console.log('this should happen');
51 52
         if (action === 'open') { this.myjQModal.open(); }
52 53
         else if (action === 'close') { this.myjQModal.close(); }
53 54
       });
... ...
@@ -55,6 +56,7 @@
55 56
       return this;
56 57
     };
57 58
   $(document).ready(function() {
59
+      console.log('boo');
58 60
     $('button[data-type=modalTrigger]').myjQModal();
59 61
   });
60 62
 }( jQuery ));