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

How to prevent jumping to top of page? #1090

Open
hemiad opened this issue May 26, 2018 · 2 comments
Open

How to prevent jumping to top of page? #1090

hemiad opened this issue May 26, 2018 · 2 comments

Comments

@hemiad
Copy link

hemiad commented May 26, 2018

Hello
when the page have scroll and click to edit field the scroll jump to top page , i have tested this solution but not work : https://stackoverflow.com/questions/3252730/how-to-prevent-a-click-on-a-link-from-jumping-to-top-of-page?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa
Sorry for my bad english
Best regards

@stefkes
Copy link

stefkes commented Jun 13, 2018

The accepted answer there (below) should work. If not, please post your code

$('a.someclass').click(function(e)
{
    e.preventDefault();
});

@hemiad
Copy link
Author

hemiad commented Jun 13, 2018

Hello
not works , this my code :

$('a').click(function(e)
        {
            e.preventDefault();
        });
        $.fn.editable.defaults.mode = 'popup';
        //make username editable
        $('a.lien').editable({
            url: '/?do=liens&action=save'
        });
        $('a.episode').editable({
            url: '/?do=liens&action=save_episode',
        });
        $('a.saison').editable({
            url: '/?do=liens&action=save_saison',

        });

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