# How to select a lot of topics fast?

**URL:** <https://meta.discourse.org/t/how-to-select-a-lot-of-topics-fast/25790>\
**Category:** Support\
**Created:** [February 27, 2015, 8:10pm UTC](https://meta.discourse.org/t/how-to-select-a-lot-of-topics-fast/25790 "2015-02-27T20:10:12Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Maestra\_Powers](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/maestra_powers/32/37362_2.png) [@Maestra\_Powers](https://meta.discourse.org/u/Maestra_Powers)\
**Post date:** [March 14, 2015, 10:21pm UTC](https://meta.discourse.org/t/how-to-select-a-lot-of-topics-fast/25790/5 "2015-03-14T22:21:55Z")

</div>

Done. Add this to `<head>`.

```
<script type="text/javascript">
$(document).ready(function() {
    if ($('button.btn.bulk-select').length) {
        var shiftOn = false;
        $(document).keydown(function (e) {
            if (e.keyCode == 16) {
                shiftOn = true;
            }
        });
        $(document).keyup(function (e) {
            if (e.keyCode == 16) {
                shiftOn = false;
            }
        });
        
        $(document).on('change', 'input.bulk-select', function() {
            
            if ((shiftOn) && ($('.start-line-bh').length)) {
                // if Shift is on and first checkbox been clicked
                var State = $('.start-line-bh input.bulk-select').prop('checked');
                $('.end-line-bh').removeClass('end-line-bh');
                $(this).parents('tr').addClass('end-line-bh');
                
                $('input.bulk-select').parents('tr').each(function() {
                    if (($(this).hasClass('start-line-bh')) || ($(this).hasClass('end-line-bh'))) {
                        if ($('.i-go-second').length) {
                            $(this).addClass('i-go-first');
                        } else {
                            $(this).addClass('i-go-second');
                        }
                    }
                });
                
            $('.i-go-first').nextUntil($('.i-go-second'), "tr" ).each(function() {
                var Obj = $(this).find('input.bulk-select');
                if (Obj.prop('checked') != State) {
                    Obj.trigger('click').prop('checked', State);
                }
            });
                
                $('.i-go-first, .i-go-second').find('input.bulk-select').prop('checked', State);
                
                $('.i-go-first').removeClass('i-go-first');
                $('.i-go-second').removeClass('i-go-second');
                
            } else {
                // if Shift is off or no checkbox been clicked yet
                $('.start-line-bh').removeClass('start-line-bh');
                $(this).parents('tr').addClass('start-line-bh');
            }
        });
    }

});
</script>

```

Click on some checkbox, then Shift+click on other. All checkboxes between them will take state of first clicked checkbox.

---

_[View the full topic](https://meta.discourse.org/t/how-to-select-a-lot-of-topics-fast/25790)._
