rabihkodeih / bootstrap-transfer

This is a two-column transfer multi-select widget inspired by Django admin module's similar widget.
Other
45 stars 46 forks source link

Prevent scroll up when click buttons #7

Open YK115 opened 11 years ago

nishadmusthafa commented 11 years ago

Hey, I saw the same issue. I tried solving it by adding an event in the click function's parameters and using event.preventDefault(). Would that be an acceptable solution too ? Just discussing.

mariela21180 commented 10 years ago

The solution is that on the .js file, on every <a href="#"> element, replace the "#" to "javascript:void(0);" So It looks like this: <a href="javascript:void(0);">

nishadmusthafa commented 10 years ago

@mariela21180 does that work in all browsers ? This was what i did -> https://github.com/nishadmusthafa/bootstrap-transfer/commit/7e001a1736007f67d52db5594a087a10804fd3f7 . It does do the job.