I am using codekit to put together a few things.
- jQuery
- Modernizr (prepended to the script below)
So I'm just troubleshooting some things and getting back to basics on a project. As is, jsHint returns the error
if (Modernizr.touch) {
'Modernizr' is not defined.
and so then I add in:
/*global Modernizr:true */
but then, I get -
Modernizr' was used before it was defined.
(function($){
// =========================================
$(document).ready(function() {
// ===============================
if (Modernizr.touch) {
alert('touch');
} else {
//alert('no-touch');
}
// ===============================
});
// =========================================
})(jQuery);
The alert works, and it's adding the class to my < html > etc... but this is driving me mad.
What am I doing wrong? (besides using codekit instead of brunch)