Hope you all are doing well.
I am developing a Meeting Room Reservation System in Visual Studio 2008.
In this I am trying to use Metro UI Drop down
I have added the Css and Javascript file
But I am getting error in JS due to following Error
Thanks In Advance
I am Getting this Error in JS
Hope you all are doing well.
I am developing a Meeting Room Reservation System in Visual Studio 2008.
In this I am trying to use Metro UI Drop down
I have added the Css and Javascript file
But I am getting error in JS due to following Error
Thanks In Advance
I am Getting this Error in JS
Share Improve this question edited Jan 30, 2013 at 6:37 Fahad Hussain asked Jan 30, 2013 at 6:22 Fahad HussainFahad Hussain 1,1851 gold badge11 silver badges17 bronze badges 5-
That doesn't look like a JS error to me, but
data-role
is indeed not valid XHTML 1.0 Transitional. Try validating against HTML5 – Explosion Pills Commented Jan 30, 2013 at 6:23 -
Data-*
is html5 patible. – Jai Commented Jan 30, 2013 at 6:25 - the JS error has nothing to do with the warning you are passing null as the argument for $ – Rune FS Commented Jan 30, 2013 at 6:42
- element li is getting recognized by its data-role in js, the data-role is not a valid attribute that is why this error is occuring – Fahad Hussain Commented Jan 30, 2013 at 6:45
-
No, as @RuneFS said, the errors are unrelated. It looks like you're missing ponents in your jQuery deployment. Where is
$.fn
defined? – Dai Commented Jan 30, 2013 at 6:59
2 Answers
Reset to default 4The data-*
attributes were introduced in HTML5. It looks like you're running Visual Studio 2008 in XHTML1.0 Transitional mode. VS2008 does not provide validation support for HTML5, seeming as VS2008 predates the first working-draft of HTML5 by about 4 months.
It isn't an error, it's a warning; however it is pletely benign and can be safely ignored.
VS's validation files are extensible (they're *.xsd files), however they didn't anticipate freeform attributes like data-foo=""
, so there is no way to get VS to ignore this class of warning, just grin and bear it.
The JS error states that $ === null
this is unrelated to the HTML and a result of passing null as the argument to function($)
the most likely cause for this error is that the script you are showing a picture of is included prior to including jQuery in the page