I have some jQuery code that is not being executed. The code block looks like
jQuery(document).ready(function() {
$('#Start').datepicker();
$('#End').datepicker();
$('#End').val('date');
$('#Start').val('start');
alert('hello');
});
but its not applying datepicker on the Start
and End
textboxes. Please note that jQuery and jQuery.ui files are added before this script. In this code block even the last line (alert
) is not being executed.
I can see on error in Firefox console that reads uncaught exception: Invalid dimensions for plot, width = null, height = null
but it does not tell me the location of the error.
What could be the problem? why this code is not running? How to debug this?
Edit 1: I have changed the code to following
jQuery(document).ready(function() {
//$('#Start').datepicker();
//$('#End').datepicker();
//$('#End').val('date');
//$('#Start').val('start');
alert('hello inside');
});
alert("hello outside");
Now there are only two alerts (rest of lines commented) the alert outside ready function executes but one that is inside does not.