JSFiddle - React, Tailwind, and code Playground
by lichangwei
HTML
<div id="result"></div>
JavaScript
function isDraggableSupported(){
var div = document.createElement('div');
return ('draggable' in div) || ('ondragstart' in div && 'ondrop' in div);
}
function isIOS(){
return /(iPhone|iPod|iPad)/.test(navigator.userAgent);
}
function isIE(){
return /MSIE/.test(navigator.userAgent);
}
$(function(){
$('#result').html( 'isDraggableSupported = ' + isDraggableSupported()
+ '<br/>isIOS=' + isIOS()
+ '<br/>isIE=' + isIE() );
});