relatively-sticky

A jQuery plugin for creating smart sticky elements
git clone https://git.ce9e.org/relatively-sticky.git

commit
2beead04206f368b5afb8d50495f5f79fc09e923
parent
00dfdcb58cbd642748b7b747d1fef18916a02c6b
Author
leaf corcoran <leafot@gmail.com>
Date
2013-09-11 06:59
add recalc test button

Diffstat

M test/index.html 18 ++++++++++++++++++

1 files changed, 18 insertions, 0 deletions


diff --git a/test/index.html b/test/index.html

@@ -52,6 +52,15 @@
   52    52         inset 0 -30px 20px -20px rgba(0,0,0,0.2), 0 0 10px red;
   53    53     }
   54    54 
   -1    55     .buttons {
   -1    56       position: fixed;
   -1    57       top: 10px;
   -1    58       right: 10px;
   -1    59       background: rgba(0,0,0, 0.2);
   -1    60       padding: 10px;
   -1    61       z-index: 100;
   -1    62     }
   -1    63 
   55    64   </style>
   56    65 
   57    66   <script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
@@ -59,6 +68,10 @@
   59    68 </head>
   60    69 <body>
   61    70 
   -1    71 <div class="buttons">
   -1    72   <button class="recalc">Recalc</button>
   -1    73 </div>
   -1    74 
   62    75 <h1>Basic Stick</h1>
   63    76 <div class="container one">
   64    77   <div class="item"></div>
@@ -180,6 +193,11 @@
  180   193       $(e.target).html("got unbottom event");
  181   194     });
  182   195 
   -1   196     $(document.body).on("click", ".recalc", function() {
   -1   197       console.log("Triggering recalc");
   -1   198       $(document.body).trigger("sticky_kit:recalc")
   -1   199     });
   -1   200 
  183   201   })();
  184   202 </script>
  185   203