GithubHelp home page GithubHelp logo

Comments (6)

peterquentin avatar peterquentin commented on August 23, 2024 2

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.

inuyaksa avatar inuyaksa commented on August 23, 2024

I'm working on it!

from jquery.nicescroll.

Ajdin avatar Ajdin commented on August 23, 2024

You need to check for content height, before initializing niceScroll plugin.
for example:
if ($("#scroll-pane>ul").height() > $("#scroll-pane").height()) {
$("#scroll-pane").niceScroll().addClass("initialized");
}

from jquery.nicescroll.

inuyaksa avatar inuyaksa commented on August 23, 2024

fixed soon

from jquery.nicescroll.

inuyaksa avatar inuyaksa commented on August 23, 2024

Try new 2.9.0 DEV version so you can make some test.
http://www.areaaperta.com/nicescroll/dev/issue29.html

from jquery.nicescroll.

ericdc1 avatar ericdc1 commented on August 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.