diff --git a/dev/js/src/menu/slider.js b/dev/js/src/menu/slider.js
index c1f0440..3313d70 100644
--- a/dev/js/src/menu/slider.js
+++ b/dev/js/src/menu/slider.js
@@ -7,10 +7,54 @@
     return Object.create(this)._init();
   },
 
+  _mousemove : function (e) {
+
+    var offset = parseInt(
+      (
+	(e.clientY - this._event.init)
+	  / this._rulerHeight
+      ) * this._screens
+    );
+
+    this.offset(offset);
+
+    e.halt();
+    /*
+      isTouch?e.touches[0]:e
+      ,offset = horizontal?client.clientX - lastClient.clientX:client.clientY - lastClient.clientY
+      ,barPos = Math.min(Math.max(orgBarPos + offset,0),dir.viewportSize-dir.barSize)
+      ;
+      //
+      inst.viewport[getScroll(horizontal)] = (barPos/dir.viewportSize)*dir.viewportScrollSize;
+    */
+  },
+
+  _mouseup : function (e) {
+    
+    window.removeEventListener('mousemove', this._event.mov);
+    window.removeEventListener('mouseup', this._event.up);
+  },
+
+  _mousedown : function (e) {
+    // Bind drag handler
+    var ev = this._event;
+    ev.init = e.clientY;
+    ev.mov = this._mousemove.bind(this);
+    ev.up = this._mouseup.bind(this);
+
+    this._rulerHeight = this._element.clientHeight; // offsetHeight?
+
+    window.addEventListener('mousemove', ev.mov);
+    window.addEventListener('mouseup', ev.up);
+
+    e.halt();
+  },
+
   // Initialize prefix object
   _init : function () {
 
     this._offset = 0;
+    this._event = {};
 
     this._element = document.createElement('div');
     this._element.setAttribute('class', 'ruler');
@@ -19,26 +63,17 @@
       document.createElement('span')
     );
 
+    // TODO: Support touch!
+    this._slider.addEventListener('mousedown', this._mousedown.bind(this), false);
+
     this._element.appendChild(document.createElement('div'));
-
-/*
-    this._string = '';
-
-    // Add prefix span
-    this._element = document.createElement('span');
-    this._element.classList.add('pref');
-    // Connect action
-
-    if (this["onclick"] !== undefined)
-      this._element["onclick"] = this.onclick.bind(this);
-
-*/    
     return this;
   },
 
   _initSize : function () {
     this._height = ((this._limit / this._length) * 100);
-    this._step = (100 - this._height) / (this._length - this._limit);
+    this._screens = this._length - this._limit;
+    this._step = (100 - this._height) / this._screens;
   },
 
   show : function (i) {
@@ -59,6 +94,9 @@
     if (off === undefined)
       return this._offset;
 
+    if (off === this._offset || off > this._screens || off < 0)
+      return;
+
     this._offset = off;
     this._slider.style.top = (this._step * off) + '%';
   },
