Making an element unselectable using jQuery

前端 未结 4 2167
生来不讨喜
生来不讨喜 2021-02-10 09:35

What\'s the best way to make an element unselectable using jQuery?

I know you can use onselectstart=\"return false;\" ondragstart=\"return false;\" in the H

4条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-10 10:18

    If you use JqueryUI you can set class="ui-state-default" to the div that you dont want to be selected.

提交回复
热议问题