From 957e0400cd7b387805565cce79698c8c2983b494 Mon Sep 17 00:00:00 2001 From: YK115 Date: Tue, 19 Feb 2013 23:45:01 +0600 Subject: [PATCH] Prevent scroll up when click buttons --- js/bootstrap-transfer.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/bootstrap-transfer.js b/js/bootstrap-transfer.js index aa94ac4..b908a80 100644 --- a/js/bootstrap-transfer.js +++ b/js/bootstrap-transfer.js @@ -39,15 +39,19 @@ /* #=============================================================================== */ _this.$add_btn.click(function(){ _this.move_elems(_this.$remaining_select.val(), false, true); + return false; }); _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); @@ -189,4 +193,4 @@ 'hilite_selection': true, 'target_id': '' } -})(jQuery); \ No newline at end of file +})(jQuery);