提交 ce34b1f3 编写于 作者: I InuYaksa

3.7.4

Fixes
- touchpad scrolling support for MS Surface aka FYI - Browser test
results on Surface Pro touchscreen and touchpad #668
- changed scrollbarid setting procedure because uglify mades
uncompatible code for IE8 aka use nicescroll in IE8 #672
- preserve scrol chain
- page scrollbar not customized on android
- prevent bar flickering when window not changed aka Using this plugin I
got a flickering scroll bar #674

Changes
- more responsive direct scrolling from bars
- more consistence scrolling speed on many browsers (Chrome, Firefox,
Edge)
- minor code optimizations and jshint check
- jQuery "bind" event function changed to "on", migration to jQuery 3
(still jQuery 1 compatible) #361
- Using jQuery.expr.pseudos, migration to jQuery 3 (still jQuery 1
compatible) #361
- changed arguments for doScrollBy and doScrollLeftBy
上级 166b9006
# jQuery.NiceScroll
v. 3.7.3 2017-06-18
v. 3.7.4
## The best nicescroll release ever - extremely smooth and consistent in modern browsers and mobile devices, with low resource usage
- [Web Site: nicescroll.areaaperta.com](https://nicescroll.areaaperta.com)
- [Repo: github.com/inuyaksa/jquery.nicescroll](https://github.com/inuyaksa/jquery.nicescroll)
......@@ -74,23 +76,23 @@ When you use zoom feature, copy image "zoomico.png" in the same folder of jquery
Initialize nicescroll ALWAYS in (document) ready statement.
```javascript
// 1. Simple mode, it styles document scrollbar:
$(document).ready(function() {
$(function() {
$("html").niceScroll();
});
// 2. Instance with object returned:
var nice = false;
$(document).ready(function() {
$(function() {
nice = $("html").niceScroll();
});
// 3. Style a DIV and chage cursor color:
$(document).ready(function() {
$(function() {
$("#thisdiv").niceScroll({cursorcolor:"#00F"});
});
// 4. DIV with "wrapper", formed by two divs, the first is the vieport, the latter is the content:
$(document).ready(function() {
$(function() {
$("#viewportdiv").niceScroll("#wrapperdiv",{cursorcolor:"#00F"});
});
......
Changelog nicescroll release 3.7.3
https://nicescroll.areaaperta.com/
https://github.com/inuyaksa/jquery.nicescroll
Fixes
- onscrollstart error on emulatetouch
Changes
- a little size optimization for uglufy version
Changelog nicescroll release 3.7.4
https://nicescroll.areaaperta.com/
https://github.com/inuyaksa/jquery.nicescroll
Fixes
- touchpad scrolling support for MS Surface aka FYI - Browser test results on Surface Pro touchscreen and touchpad #668
- changed scrollbarid setting procedure because uglify mades uncompatible code for IE8 aka use nicescroll in IE8 #672
- preserve scrol chain
- page scrollbar not customized on android
- prevent bar flickering when window not changed aka Using this plugin I got a flickering scroll bar #674
Changes
- more responsive direct scrolling from bars
- more consistence scrolling speed on many browsers (Chrome, Firefox, Edge)
- minor code optimizations and jshint check
- jQuery "bind" event function changed to "on", migration to jQuery 3 (still jQuery 1 compatible) #361
- Using jQuery.expr.pseudos, migration to jQuery 3 (still jQuery 1 compatible) #361
- changed arguments for doScrollBy and doScrollLeftBy
\ No newline at end of file
......@@ -24,17 +24,17 @@ body {
}
</style>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="js/jquery.nicescroll.js"></script>
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script src="js/jquery.nicescroll.min.js"></script>
<script>
var nice = false;
$(document).ready(function() {
$(function() {
nice = $("html").niceScroll();
});
var obj = window;//$(window);
var obj = window;
console.log(obj.length);
console.log("selector" in obj);
......
此差异已折叠。
......@@ -76,12 +76,10 @@
$.nicescroll.each(function () {
var nice = this;
nice.scrollstart(function () {
console.log("start");
if (!hasstyle) sheet.insertRule("iframe { pointer-events: none !important; }", 0);
hasstyle = true;
});
nice.scrollend(function () {
console.log("end");
if (hasstyle) sheet.deleteRule(0);
hasstyle = false;
});
......
/* iframe helper for nicescroll v3.7.3 InuYaksa - MIT - https://nicescroll.areaaperta.com */
!function(e,t){function n(t){var n=e.createEvent("MouseEvents");n.initEvent("wheel",!0,!0),n.deltaMode=t.deltaMode,n.deltaX=t.deltaX,n.deltaY=t.deltaY,n.deltaZ=t.deltaZ,n.wheelDelta=t.wheelDelta,n.wheelDeltaX=t.wheelDeltaX,n.wheelDeltaY=t.wheelDeltaY,o.dispatchEvent(n)}function l(e){do{if(void 0!==$.data(e,"__nicescroll"))return e;e=e.parentNode||!1}while(e);return!1}var a=e.body,o=t.parent;if(o&&"createEvent"in e){a.addEventListener("wheel",n)}if(t.addEventListener){var r=function(){var t=e.createElement("style");return t.appendChild(e.createTextNode("")),e.head.appendChild(t),t.sheet}(),d=null,i=null,c=[];t.addEventListener("scroll",function(e){i&&t.scrollTo(c[0],c[1])}),t.addEventListener("load",function(){var e=!1;$.nicescroll.each(function(){var t=this;t.scrollstart(function(){console.log("start"),e||r.insertRule("iframe { pointer-events: none !important; }",0),e=!0}),t.scrollend(function(){console.log("end"),e&&r.deleteRule(0),e=!1})}),$("iframe").each(function(){this.addEventListener("mouseenter",function(e){var n=l(d=e.target);i=n,c=[t.scrollX,t.scrollY]}),this.addEventListener("mouseleave",function(e){d=i=null})})})}}(document,window);
\ No newline at end of file
/* iframe helper for nicescroll v3.7.4 InuYaksa - MIT - https://nicescroll.areaaperta.com */
!function(e,t){function n(t){var n=e.createEvent("MouseEvents");n.initEvent("wheel",!0,!0),n.deltaMode=t.deltaMode,n.deltaX=t.deltaX,n.deltaY=t.deltaY,n.deltaZ=t.deltaZ,n.wheelDelta=t.wheelDelta,n.wheelDeltaX=t.wheelDeltaX,n.wheelDeltaY=t.wheelDeltaY,r.dispatchEvent(n)}function l(e){do{if(void 0!==$.data(e,"__nicescroll"))return e;e=e.parentNode||!1}while(e);return!1}var a=e.body,r=t.parent;if(r&&"createEvent"in e){a.addEventListener("wheel",n)}if(t.addEventListener){var i=function(){var t=e.createElement("style");return t.appendChild(e.createTextNode("")),e.head.appendChild(t),t.sheet}(),d=null,o=null,c=[];t.addEventListener("scroll",function(e){o&&t.scrollTo(c[0],c[1])}),t.addEventListener("load",function(){var e=!1;$.nicescroll.each(function(){var t=this;t.scrollstart(function(){e||i.insertRule("iframe { pointer-events: none !important; }",0),e=!0}),t.scrollend(function(){e&&i.deleteRule(0),e=!1})}),$("iframe").each(function(){this.addEventListener("mouseenter",function(e){var n=l(d=e.target);o=n,c=[t.scrollX,t.scrollY]}),this.addEventListener("mouseleave",function(e){d=o=null})})})}}(document,window);
\ No newline at end of file
此差异已折叠。
此差异已折叠。
......@@ -76,12 +76,10 @@
$.nicescroll.each(function () {
var nice = this;
nice.scrollstart(function () {
console.log("start");
if (!hasstyle) sheet.insertRule("iframe { pointer-events: none !important; }", 0);
hasstyle = true;
});
nice.scrollend(function () {
console.log("end");
if (hasstyle) sheet.deleteRule(0);
hasstyle = false;
});
......
/* iframe helper for nicescroll v3.7.3 InuYaksa - MIT - https://nicescroll.areaaperta.com */
!function(e,t){function n(t){var n=e.createEvent("MouseEvents");n.initEvent("wheel",!0,!0),n.deltaMode=t.deltaMode,n.deltaX=t.deltaX,n.deltaY=t.deltaY,n.deltaZ=t.deltaZ,n.wheelDelta=t.wheelDelta,n.wheelDeltaX=t.wheelDeltaX,n.wheelDeltaY=t.wheelDeltaY,o.dispatchEvent(n)}function l(e){do{if(void 0!==$.data(e,"__nicescroll"))return e;e=e.parentNode||!1}while(e);return!1}var a=e.body,o=t.parent;if(o&&"createEvent"in e){a.addEventListener("wheel",n)}if(t.addEventListener){var r=function(){var t=e.createElement("style");return t.appendChild(e.createTextNode("")),e.head.appendChild(t),t.sheet}(),d=null,i=null,c=[];t.addEventListener("scroll",function(e){i&&t.scrollTo(c[0],c[1])}),t.addEventListener("load",function(){var e=!1;$.nicescroll.each(function(){var t=this;t.scrollstart(function(){console.log("start"),e||r.insertRule("iframe { pointer-events: none !important; }",0),e=!0}),t.scrollend(function(){console.log("end"),e&&r.deleteRule(0),e=!1})}),$("iframe").each(function(){this.addEventListener("mouseenter",function(e){var n=l(d=e.target);i=n,c=[t.scrollX,t.scrollY]}),this.addEventListener("mouseleave",function(e){d=i=null})})})}}(document,window);
\ No newline at end of file
/* iframe helper for nicescroll v3.7.4 InuYaksa - MIT - https://nicescroll.areaaperta.com */
!function(e,t){function n(t){var n=e.createEvent("MouseEvents");n.initEvent("wheel",!0,!0),n.deltaMode=t.deltaMode,n.deltaX=t.deltaX,n.deltaY=t.deltaY,n.deltaZ=t.deltaZ,n.wheelDelta=t.wheelDelta,n.wheelDeltaX=t.wheelDeltaX,n.wheelDeltaY=t.wheelDeltaY,r.dispatchEvent(n)}function l(e){do{if(void 0!==$.data(e,"__nicescroll"))return e;e=e.parentNode||!1}while(e);return!1}var a=e.body,r=t.parent;if(r&&"createEvent"in e){a.addEventListener("wheel",n)}if(t.addEventListener){var i=function(){var t=e.createElement("style");return t.appendChild(e.createTextNode("")),e.head.appendChild(t),t.sheet}(),d=null,o=null,c=[];t.addEventListener("scroll",function(e){o&&t.scrollTo(c[0],c[1])}),t.addEventListener("load",function(){var e=!1;$.nicescroll.each(function(){var t=this;t.scrollstart(function(){e||i.insertRule("iframe { pointer-events: none !important; }",0),e=!0}),t.scrollend(function(){e&&i.deleteRule(0),e=!1})}),$("iframe").each(function(){this.addEventListener("mouseenter",function(e){var n=l(d=e.target);o=n,c=[t.scrollX,t.scrollY]}),this.addEventListener("mouseleave",function(e){d=o=null})})})}}(document,window);
\ No newline at end of file
此差异已折叠。
此差异已折叠。
{
"name": "nicescroll",
"version": "3.7.3",
"version": "3.7.4",
"bugs": "https://github.com/inuyaksa/jquery.nicescroll/issues",
"repository": {
"type": "git",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册