JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="http://cdn.kendostatic.com/2012.1.515/styles/kendo.mobile.all.min.css">
<script src="http://brandonaaron.github.com/jquery-mousewheel/jquery.mousewheel.js"></script>
<script src="http://cdn.kendostatic.com/2012.1.515/js/kendo.all.min.js"></script>
<div data-role="view" id="tabstrip-editor" data-title="Editor Settings" data-layout="options-tabstrip" data-init="attachToScroller">
<ul data-role="listview" data-style="inset" data-type="group">
<li>
Theme
<ul>
<li>Use Dark colored theme <input type="checkbox" data-role="switch"/></li>
<li>
<label>
Light
<select data-role="dropdownlist">
<option value="chrome">Chrome</option>
<option value="clouds">Clouds</option>
</select>
</label>
</li>
<li>
<label>
Dark
<select data-role="dropdownlist">
<option value="ambiance">Ambiance</option>
<option value="chaos">Chaos</option>
</select>
</label>
</li>
<li>
<label>
Font Size
<select data-role="dropdownlist">
<option value="10px">10px</option>
<option value="11px">11px</option>
</select>
</label>
</li>
<li>Show Gutter <input type="checkbox" data-role="switch"/></li>
<li>Fade Fold Widgets <input type="checkbox" data-role="switch"/></li>
<li>Show...
JavaScript
function matrixToArray(matrix) {
return matrix.substr(7, matrix.length - 8).split(', ');
}
function attachToScroller(e) {
var scroller = e.view.scroller;
e.view.scroller.element.find('.km-scroll-container').mousewheel(function (event, delta, deltaX, deltaY) {
event.preventDefault();
var matrix = matrixToArray($(event.currentTarget).css("-webkit-transform"));
var currentScroll = parseInt(matrix[5], 10);
var scrollingamount = currentScroll + deltaY * 15;
if (deltaY > 0) {
if (-currentScroll > 9)
scroller.scrollTo(0, scrollingamount);
else
scroller.scrollTo(0, 0);
}
else {
var maximum = scroller.scrollHeight() - $(scroller.element).height();
if(maximum + currentScroll > 0)
scroller.scrollTo(0, scrollingamount);
else
scroller.scrollTo(0, -maximum);
}
});
scroller.bind("scroll", function (e) {
console.log(e.scrollTop);
console.log(e.scrollLeft);
});
}
new kendo.mobile.Application();