Giter Site home page Giter Site logo

Comments (10)

tkahn avatar tkahn commented on September 22, 2024

Could you post your code? I think I can understand the problem better if I can see your setup. If you are using autoscrolling to scroll the content, there are different callbacks for when the left or right limit has been reached.

http://www.smoothdivscroll.com/callbacks.html#autoScrollingLeftLimitReached
http://www.smoothdivscroll.com/callbacks.html#autoScrollingRightLimitReached

But I guess that wasn't the problem in this case?

from smooth-div-scroll.

css117 avatar css117 commented on September 22, 2024

Indeed, I don't use autoscroll.
The main callback I needed was scrollerRightLimitReached, triggered by mouse wheel or touch slide.
If I set the option :
$("#makeMeScrollable").SmoothDivScroll({
hotSpotScrolling: false
});

the callback scrollerRightLimitReached is ignored :

$("#makeMeScrollable").SmoothDivScroll({
hotSpotScrolling: false,
scrollerRightLimitReached : function() {
console.log("right end is reached");
}
});

In your code, this callback is triggered in a loop concerning hotspot.
:)

from smooth-div-scroll.

tkahn avatar tkahn commented on September 22, 2024

Ah! I see.
This is because mousewheel and touch scrolling has been added on much later and I haven't updated the callbacks. I'll look into this!

from smooth-div-scroll.

css117 avatar css117 commented on September 22, 2024

And if you move your callback, it would be nice to implement a scrollerRightLimitSoon : almost the same, but triggered before the end is reached. It will allow to refill the content before the user realise it, and make the scroll look infinite.
:)
Thanks !

from smooth-div-scroll.

andrewminton avatar andrewminton commented on September 22, 2024

That callback could also be used for lazyload implementation could it not?

from smooth-div-scroll.

css117 avatar css117 commented on September 22, 2024

if by lazyload you mean loading just before it's necessary, that's my point ;)

from smooth-div-scroll.

tkahn avatar tkahn commented on September 22, 2024

This is a new feature and I understand that it could be very useful. I will add these two items to my list of requested features:

  1. Make the plugin trigger scrollerRightLimitReached/scrollerLeftLimitReached with mousewheel and touch scrolling as well (bugfix).
  2. Add new callbacks that is triggered when the scroller reaches a certain point (preferably user defined in pixels) before the left or right end of the scroller (new feature).

from smooth-div-scroll.

css117 avatar css117 commented on September 22, 2024

Well, I made my first fork (I hope I did it properly) for the callback before the end is reached.
You can see the reasult plugged into a drupal here : http://circulart.fr/liste-des-artistes
:)

from smooth-div-scroll.

tkahn avatar tkahn commented on September 22, 2024

Yes, your fork looks good!
The only problem is that I have a working copy of the code that is not published here on GitHub (yet) and there are many other changes in that. So I will probably not merge but nevertheless it was great to see your implementation and I think I will use it!

from smooth-div-scroll.

AndreiBarsan avatar AndreiBarsan commented on September 22, 2024

Apparently callbacks still aren't working in the current version... Any plans on fixing them?

from smooth-div-scroll.

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.