Multi-select dropdowns in Forms

Hi Richard,
Assuming “Sign me up for the following” is the field we are talking about, this is exactly what I’m looking for.
However, I did not understand where and how did you put the:

<script>
    $('option').mousedown(function(e) {
        e.preventDefault();
        var originalScrollTop = $(this).parent().scrollTop();
        console.log(originalScrollTop);
        $(this).prop('selected', $(this).prop('selected') ? false : true);
        var self = this;
        $(this).parent().focus();
        setTimeout(function() {
            $(self).parent().scrollTop(originalScrollTop);
        }, 0);
        
        return false;
    });
    </script>

Thanks
1 Like