I have a section of a website that relies on drag and drop in HTML5. I would like the site to alert the user on the home page whether their browser supports it and I have tried to use Modernizr but without success.
I have used the modernizr site to create a custom file (the one included in this instance has all HTML5 options selected) but it does nothing. I have tried creating several but with no joy.
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js" type="text/javascript"></script>
<script src="js/modernizr.custom.75231.js"></script>
<script>
if(Modernizr.draganddrop){
alert("Your browser supports drag and drop!!");
}else{
alert("Sorry, browser does not support drag and drop!");
}
</script>
</head>
<body>
Some text
</body>
</html>
Am I missing something?
Thanks
Just to update, I have created the modernizr file again to include all of the CSS options and now it detects every browser including ie 7 as drag and drop compatible
js/modernizr.custom.18141.js