-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
non-Ajax equivalent of changeContent() method and more. #10
Comments
Hi! I love the work you are putting in to contribute! /Thomas |
I'm looking over the code right now and I think the function for adding or replacing content (changeContent) will become bloated and complicated to understand and use if I just keep adding new functionality to it, especially since I want to add a filtering option to the AJAX content loader. Therefore I'm now working on a solution where I split it into three different methods, each with a specific purpose: getFlickrContent getAjaxContent getHtmlContent I know this means that people will have to look over their code if they want to upgrade, but in the long run I think it's worth it. /Thomas |
Sorry with the delay. These are good points! Let me know, when you merge this! |
Implemented in release 1.3! |
Hello, Thomas.
Please, consider adding following public methods:
Method "currentScroll" (or currentOffset maybe?) which will return current offset. Without having it, I need to rip it now from .data("scrollWrapper").scrollLeft() (I found you do it this way in a source code).
Method which is Non-AJAX equivalent of changeContent but allowing to just insert(after/before) or replace simple html content. This is how I do it now, ripping more low-level stuff from your source:
I hope this piece clearly demonstrates the need of the second method.
Maybe, 'currentScroll' method even is not needed, if non-Ajax 'changeContent' will encapsulate preserving of current offset after content change.
Also please see my 'sortable_smooth' branch in my fork of your repo: https://github.com/stanislaw/Smooth-Div-Scroll/tree/sortable_smooth.
See there 'sortable_smooth.html'. It is just your demo index.html with three or four lines added. It is a demonstration of how SmoothDivScroll can play very nice with jQuery Sortable so itt becomes Smooth Sortable Div Scroller. ;)
Maybe you will want somehow adapt it to your examples page.
I found the possibility of this mixture (smooth sortables) very useful in my current project.
That is all!
Thanks for a great work on plugin!
The text was updated successfully, but these errors were encountered: