Jump to content

Modernizr - Problems using Javascript tests


afish674

Recommended Posts

Hi, I'm trying to test for the date attribute in an html 5 form element. If it isn't supported I want to use the jQuery UI to replace it with one. I have loaded jQuery and a script called "actions.js" in the head of my document which contains this code:

Modernizr.load({  test: Modernizr.inputtypes.date,  nope: [    'jquery-ui-1.8.18.custom.min.js',  'css/pepper-grinder/jquery-ui-1.8.18.custom.css',    'old-browsers.js'  ]});

The old-browsers.js contains this code:

$(document).ready(function(){$("input[type='date']").datepicker();});

When I open the page in firefox - which doesn't support the date picker, nothing happens still. I can't work out whats going wrong. Is there an easy way to find the problem using firebug? Its not picking up any javascript errors as far as i can tell. Otherwise, what am I doing wrong? Thanks.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...