Determine if browser is drag-and-drop capable?

后端 未结 5 586
礼貌的吻别
礼貌的吻别 2021-01-03 00:43

I\'m implementing jQuery File Upload and trying to figure out the best way to detect whether the client can support drag & drop so I can render something like \'Drag &am

5条回答
  •  醉话见心
    2021-01-03 00:55

    Modernizr is the de-facto browser support detection plugin and supports drag-and-drop detection.

    In Modernizr 1.5, we test for the following drag events:

    • drag
    • dragstart
    • dragenter
    • dragover
    • dragleave
    • dragend
    • drop

    Source

提交回复
热议问题