Skip to content

Jumps to the top of the page #1

Description

@cdeyoung

If the bootstrap-transfer widget is included down far enough on the page that you have to scroll to see it, the page will jump back to the top whenever you move data from one column to the other. To fix the problem, you can add "return false; to the following functions:

        _this.$add_btn.click(function(){
            _this.move_elems(_this.$remaining_select.val(), false, true);
            return false;   <--  Add "return false;" to the function to keep the page from jumping back to the top"
        });
        _this.$remove_btn.click(function(){
            _this.move_elems(_this.$target_select.val(), true, false);
            return false;
        });
        _this.$choose_all_btn.click(function(){
            _this.move_all(false, true);
            return false;
        });
        _this.$clear_all_btn.click(function(){
            _this.move_all(true, false);
            return false;
        });
        _this.$filter_input.keyup(function(){
            _this.update_lists(true);
            return false;
        });

Thanks for the great plugin, by the way! It looks beautiful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions