Skip to content
This repository
Browse code

simplify on-page navigation.

  • Loading branch information...
commit c80dd52f3642ad18675d2f9711e7f478f7590576 1 parent 754d46c
Saman Bemel-Benrud authored December 23, 2012
3  _layouts/drawings.html
@@ -21,9 +21,6 @@
21 21
 </ul>
22 22
 
23 23
 <ul class='nav onpage'>
24  
-  <li class='next'><a href='#image-1'>next</a>
25  
-  </li>
26  
-  <li class='prev inactive'><a>previous</a></li>
27 24
   <li class='top inactive'><a href='#title'>top</a></li>
28 25
 </ul>
29 26
 
18  js/site.js
@@ -14,26 +14,8 @@ $(document).ready(function(){
14 14
   $(window).scroll(function() {
15 15
       var t = $(window).scrollTop(),
16 16
           h = $('.images img').height() + 40,
17  
-          bottom = ($('.images img').length - 1.5) * h,
18 17
           pg = Math.round(t / h) + 2;
19 18
 
20  
-    $nxt.attr('href', '#image-' + pg);  
21  
-    $pre.attr('href', '#image-' + (pg - 2));  
22  
-
23  
-    if (t > bottom ) {
24  
-      $nxt.parent().addClass('inactive')
25  
-      $pre.removeAttr('href');
26  
-    } else {
27  
-      $nxt.parent().removeClass('inactive')
28  
-    };
29  
-
30  
-    if (pg < 3 ) {
31  
-      $pre.parent().addClass('inactive')
32  
-      $pre.removeAttr('href');
33  
-    } else {
34  
-      $pre.parent().removeClass('inactive');
35  
-    };
36  
-
37 19
     if (t < 10 ) {
38 20
       $top.parent().addClass('inactive');
39 21
     } else {

0 notes on commit c80dd52

Please sign in to comment.
Something went wrong with that request. Please try again.