Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

what is niceScroll

//Nicescroll is a jquery plugin, for nice scrollbars with a very similar ios/mobile style. 


// 1. Simple mode, it styles document scrollbar:
$(function() {  
    $("body").niceScroll();
});

// 2. Instance with object returned:
var nice = false;
$(function() {  
    nice = $("body").niceScroll();
});

// 3. Style a DIV and change cursor color:
$(function() {  
    $("#thisdiv").niceScroll({cursorcolor:"#00F"});
});

// 4. DIV with "wrapper", formed by two divs, the first is the vieport, the latter is the content:
$(function() {
    $("#viewportdiv").niceScroll("#wrapperdiv",{cursorcolor:"#00F"});
});

// 5. Get nicescroll object:
var nice = $("#mydiv").getNiceScroll();

// 6. Hide scrollbars:
$("#mydiv").getNiceScroll().hide();

// 7. Check for scrollbars resize (when content or position have changed):
$("#mydiv").getNiceScroll().resize();

// 8. Scrolling to a position:
$("#mydiv").getNiceScroll(0).doScrollLeft(x, duration); // Scroll X Axis
$("#mydiv").getNiceScroll(0).doScrollTop(y, duration); // Scroll Y Axis
Comment

PREVIOUS NEXT
Code Example
Javascript :: angular 8 to 9 
Javascript :: pagination jsonplaceholder 
Javascript :: last position of array javascript 
Javascript :: react construct 
Javascript :: have flat list automatically wrap react native 
Javascript :: first letter capital in javascript 
Javascript :: loopback model properties default 
Javascript :: how to validate age above 18 in javascript 
Javascript :: use local storage on server with node 
Javascript :: http get request js 
Javascript :: calling javascript functions from unity scripts 
Javascript :: javascript log dom element 
Javascript :: javascript order array by date 
Javascript :: javascript compare two dates 
Javascript :: number pyramid javascript 
Javascript :: how to tell c++ a function exists before calling 
Javascript :: js read date from milliseconds 
Javascript :: update angular to specific version 
Javascript :: javascript paragraph count 
Javascript :: unhandledpromiserejectionwarning: mongooseerror: the `uri` parameter to `openuri()` must be a string, got "undefined". 
Javascript :: getters in nuxt vuex acccessing 
Javascript :: input radio checked jquery 
Javascript :: react event target square brackets 
Javascript :: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory 
Javascript :: object element by index javascript 
Javascript :: statusbar.sethidden(true) in react native 
Javascript :: jest array contain object with prop 
Javascript :: convert a string to a number in js 
Javascript :: how to display text with formating react js 
Javascript :: Installation failed, reverting ./composer.json and ./composer.lock to their original content. 
ADD CONTENT
Topic
Content
Source link
Name
8+1 =