Skip to content
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

Auto Move when no activity #13

Closed
migueltavares opened this issue Mar 31, 2011 · 8 comments
Closed

Auto Move when no activity #13

migueltavares opened this issue Mar 31, 2011 · 8 comments

Comments

@migueltavares
Copy link

Hi there, thanks for such a great jQuery code! ;)
I was wondering how could I set a timer, that would activate on no-activity, which would auto slide container?

@azoff
Copy link
Owner

azoff commented Mar 31, 2011

It's probably not the easiest thing to do right now, but I can add
functionality for it in the next patch!

On Thu, Mar 31, 2011 at 2:14 AM, migueltavares <
[email protected]>wrote:

Hi there, thanks for such a great jQuery code! ;)
I was wondering how could I set a timer, that would activate on
no-activity, which would auto slide container?

Reply to this email directly or view it on GitHub:
#13

@migueltavares
Copy link
Author

Thanks alot! ;)
When will you be releasing the next patch?

@azoff
Copy link
Owner

azoff commented Mar 31, 2011

not sure yet, I have to find time...

On Thu, Mar 31, 2011 at 9:31 AM, migueltavares <
[email protected]>wrote:

Thanks alot! ;)
When will you be releasing the next patch?

Reply to this email directly or view it on GitHub:
#13 (comment)

@migueltavares
Copy link
Author

Ok buddy. Thanks in advanced.

@migueltavares
Copy link
Author

Have you managed to add the extra function buddy?
Is there anything I can help you ?

@azoff
Copy link
Owner

azoff commented Apr 20, 2011

Hey, sorry, I haven't. Been too busy at my real job. Feel free to fork the
code and submit a pull request if you'd like to make changes yourself.

  • Jon

On Wed, Apr 20, 2011 at 4:02 AM, migueltavares <
[email protected]>wrote:

Have you managed to add the extra function buddy?
Is there anything I can help you ?

Reply to this email directly or view it on GitHub:
#13 (comment)

@azoff
Copy link
Owner

azoff commented Apr 24, 2011

Rather than adding this functionality into overscroll directly, I decided to remove the legacy 'onDriftEnd' option and just add drift events. In 1.4.3, you'll be able to listen to these events and accomplish what you want to do. Here is how you would do it (haven't tested this, its strictly for example purposes):

// keep track of the timeout
var timeout, waitBeforeAutoScroll = 1000;
$('#someElement').overscroll().bind('overscroll:dragstart', function(){
    var elm = $(this);
    if(timeout) { clearTimeout(timeout); }
    timeout = setTimeout(function(){
         elm.animate({ scrollLeft: 1000}, 1000); // scroll the element to 1000 pixels in 1 second.
    }, waitBeforeAutoScroll)
});

Expect the 1.4.3 drop by tonight.

@azoff azoff closed this as completed Apr 24, 2011
@migueltavares
Copy link
Author

Thanks alot buddy, I got it working just like I wanted! ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants