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

can pageslide auto open by simply moving mouse to extreme left of browser window (x=0) w/o any clicks #24

Open
gtesslerge opened this issue Sep 20, 2014 · 1 comment

Comments

@gtesslerge
Copy link

any advice?

Thank you.

@timcosta
Copy link
Contributor

Hi gtesslerge -

You can have pageslide auto-open in the way you described by setting a variable on $rootScope to true when the mouse is against the left side of the site, and using that variable in ps-open.

app.js

$rootScope.leftPSOpen = false;

$(window).mousemove(function(e) {
    if(e.pageX <= 10) {
        $rootScope.leftPSOpen = true;
    }
}

index.html

<ng-pageslide ps-open="leftPSOpen">your content</ng-pageslide>

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

No branches or pull requests

3 participants