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

onComplete, onStart callbacks not being triggered #13

Open
RusinovAnton opened this issue Feb 1, 2017 · 1 comment
Open

onComplete, onStart callbacks not being triggered #13

RusinovAnton opened this issue Feb 1, 2017 · 1 comment

Comments

@RusinovAnton
Copy link

Hello, thanks for library. I'm using latest version of mPageScroll2id and jQuery 1.9.1.
The following snippet shows how I init it on my page:

 $("a[href^='#'], a[rel='m_PageScroll2id']").mPageScroll2id({
        highlightSelector: ".my-selector a",
        offset: 50,
        onStart: function() {
          console.log(arguments);
          console.log(this);
        },
        onComplete: function() {
          console.log(arguments);
          console.log(this);
        }
});

None of console.log is called.

@RusinovAnton
Copy link
Author

@malihu
Also in the example on site you're using some variable mPS2id which I cannot understand how to get:

$("a[rel='m_PageScroll2id']").mPageScroll2id({
    onStart:function(){
        myCustomFn1();
    },
    onComplete:function(){
        myCustomFn2();
    }
});

function myCustomFn1(){
    console.log(mPS2id.target.attr("id"));
}
function myCustomFn2(){
    console.log(mPS2id.scrollTo.y);
}

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

1 participant