Giter Site home page Giter Site logo

bseth99 / jquery-ui-scrollable Goto Github PK

View Code? Open in Web Editor NEW
26.0 26.0 9.0 239 KB

A jQuery UI widget that enables monitoring, querying, or changing the scroll position of an element relative to a scrolling container

License: MIT License

Shell 100.00%

jquery-ui-scrollable's People

Contributors

bseth99 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

jquery-ui-scrollable's Issues

Scrollable within Jquery Tabs

Hi - Appreciate this is a couple of years old now, but any help welcome...

I've got a scrollable div within a jquery tab that isn't highlighted on init. It's set to overflow: auto. Within that div, I've got another div at the end of a list that I want to trigger with scrollable when it comes into view.

In line 211 of your code...

this.container = this.element.closest(':scrollable'+...

My container div isn't getting picked up by the :scrollable pseudo filter, so the plugin is reverting to monitoring the window. I'm currently assuming that this is because it's hidden (or something similar due to the tabs plugin).

I'm currently patching it by using...

 this.container = this.element.scrollParent();

It kind of works, but appears to trigger early and doesn't take into account individual scroll directions.

I can provide more info if required, but off the top of your head is there any solution to this? I might have to make a cut down demo to test it, as the page it's on is quite long.


Whilst testing I've also got a feature request (sorry about this). Is there any way you could monitor a scrollable element and the window?

On my tab I've basically got a news list on the left (scrollable div) and news content on the right. I'm using this plugin to trigger an ajax request to load more news into the list when a loader gif is scrolled to at the end.

My issue is that if the article the page initially loads with is very long, the news list on the left will have no scroll bars, but the user will scroll the window down, bringing my loader gif into view. Because the list div has not been scrolled, the plugin will not be triggered.

Apologies if this doesn't make sense!

Force check in-view elements upon initial load

First off, I'll echo Cessquill in saying that I know this is an older project... but I thought I'd see if you had any thoughts on my problem. I'm looking for a way to basically "force" a check upon page load, to see if any elements are in view before I start scrolling.

Any help is appreciated, thank you! :)

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.