瀏覽代碼

restoring the old index

Gianluca Guarini 12 年之前
父節點
當前提交
8b766ed830
共有 1 個文件被更改,包括 11 次插入15 次删除
  1. 11 15
      demo/index.html

+ 11 - 15
demo/index.html

@@ -44,25 +44,21 @@
 </style>
 
 <script src="js/jquery.min.js"></script>
-<script src="../jquery.nicescroll.js"></script>
+<script src="js/jquery.nicescroll.min.js"></script>
 
 <script>
   $(document).ready(function() {
-  var nice = $("html").niceScroll();
-  $("#div1").html($("#div1").html()+' '+nice.version);
-
-  var toggleScroll = function () {
-    if (nice) {
-      nice.remove();
-      nice = null;
-    } else {
-      nice = $("html").niceScroll();  // The document page (body)
-    }
-
-  };
+  
+	var nice = $("html").niceScroll();  // The document page (body)
+	
+	$("#div1").html($("#div1").html()+' '+nice.version);
+    
+    $("#boxscroll").niceScroll({cursorborder:"",cursorcolor:"#00F",boxzoom:true}); // First scrollable DIV
 
-  $('button').on('click',toggleScroll);
+    $("#boxscroll2").niceScroll("#contentscroll2",{cursorcolor:"#F00",cursoropacitymax:0.7,boxzoom:true,touchbehavior:true});  // Second scrollable DIV
+    $("#boxframe").niceScroll("#boxscroll3",{cursorcolor:"#0F0",cursoropacitymax:0.7,boxzoom:true,touchbehavior:true});  // This is an IFrame (iPad compatible)
 	
+    $("#boxscroll4").niceScroll("#boxscroll4 .wrapper",{boxzoom:true});  // hw acceleration enabled when using wrapper
     
   });
 </script>
@@ -72,7 +68,7 @@
 </head>
 
 <body>
-<button>Toggle scroll</button>
+
 <div id="div1"><strong>NiceScroll version:</strong></div>
 
 <div id="boxscroll">