-1

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

enter image description here

Thanks In Advance

enter image description here

I am Getting this Error in JS

Fahad Hussain
  • 1,165
  • 1
  • 10
  • 17
  • 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 Jan 30 '13 at 06:23
  • `Data-*` is html5 compatible. – Jai Jan 30 '13 at 06:25
  • the JS error has nothing to do with the warning you are passing null as the argument for $ – Rune FS Jan 30 '13 at 06: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 Jan 30 '13 at 06:45
  • No, as @RuneFS said, the errors are unrelated. It looks like you're missing components in your jQuery deployment. Where is `$.fn` defined? – Dai Jan 30 '13 at 06:59

2 Answers2

4

The 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 completely 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.

Dai
  • 141,631
  • 28
  • 261
  • 374
1

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

Rune FS
  • 21,497
  • 7
  • 62
  • 96