How to unselect text from jQuery

Asked 2 years ago, Updated 2 years ago, 31 views

How do I deselect text in jQuery?

javascript jquery

2022-09-22 08:14

1 Answers

(function($){
    $.fn.disableSelection = function() {
        return this
                 .attr('unselectable', 'on')
                 .css('user-select', 'none')
                 .on('selectstart', false);
    };
})(jQuery);


2022-09-22 08:14

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.