Comments (6)
I sort of had the same issue though I was pulling content from a hidden div box and was using 1 div to show my content and resize accordingly.
After analyzing the code a bit, I saw that with the existing methods I was unable to get the job done (well I could but there is a piece of logic that handles unwanted resizes when u only use static content that will always have a certain height).
So I added another funtion to the plugin and called that before resizing:
this.visible = function() {
self.visibility = true;
return self;
};
If we want to be able to trigger this function we should add it to the array of allowed functions to call:
Replace this:
['show','hide','onResize','resize','remove','stop'],
With this:
['visible','show','hide','onResize','resize','remove','stop'],
Then your done with the modification. After you have succesfully initialized your plugin on an element, you can call the function:
// First get nicescroll from $.data by using getNiceScroll()
var $scroll = $('#scroll-pane').getNiceScroll();
$scroll.visible().resize().show();
I hope it helps you out a bit.
from jquery.nicescroll.
I'm working on it!
from jquery.nicescroll.
You need to check for content height, before initializing niceScroll plugin.
for example:
if (
$("#scroll-pane").niceScroll().addClass("initialized");
}
from jquery.nicescroll.
fixed soon
from jquery.nicescroll.
Try new 2.9.0 DEV version so you can make some test.
http://www.areaaperta.com/nicescroll/dev/issue29.html
from jquery.nicescroll.
Seems to be working. I am also using the code you posted to use nicescroll with a fixed div. thanks!
Eric
On May 3, 2012, at 4:37 PM, Inuyaksa [email protected] wrote:
Try new 2.9.0 DEV version so you can make some test.
http://www.areaaperta.com/nicescroll/dev/issue29.html
Reply to this email directly or view it on GitHub:
#28 (comment)
from jquery.nicescroll.
Related Issues (20)
- Respect prefers-reduced-motion: reduce
- Scrollbar in mobile HOT 1
- css scroll-snap-type compatibility HOT 2
- Middle-click scroll does not work HOT 2
- scroll event HOT 2
- niceScroll with re sizable textarea height.
- sorry nothing - was cleaning my keyboard
- overflow:hidden for body not work in nicescroll in active HOT 2
- users script for browser
- ERROR: [Intervention] Unable to preventDefault .......... HOT 7
- The page doesn't scroll to show search results when we use Ctrl+F to search text in page HOT 1
- Touchpad scroll on horizontal gets too hard and sticky HOT 1
- Smoothscroll
- [Webpack] - niceScroll is not a function
- Unable to preventDefault inside passive event listener due to target being treated as passive.
- Nice Scroll doesnโt work on ios
- code is wrong
- Browser search with Ctrl + f not scrolling to searched results on enter with nicescroll.
- nicescroll not working well on android Google Chrome in Samsung Galaxy fold 2
- scrollbar get wrong position
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jquery.nicescroll.