katit
katit

Reputation: 17905

Error when using CDN for jQuery

Probably something obvious but I'm very new to jQuery and ajax overall. Environment - ASP.NET

I referenced jQuery like so:

<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.9.1.min.js" type="text/javascript"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.10.1/jquery-ui.min.js" type="text/javascript"></script> 
<link href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.10.1/themes/blitzer/jquery-ui.css" rel="stylesheet" type="text/css"/>

When I start web project I get error popup:

Unhandled exception at line 4, column 10920 in http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.9.1.min.js

0x800a139e - JavaScript runtime error: Syntax error, unrecognized expression: img["data-over"]:eq(0)

What am I doing wrong?

Upvotes: 2

Views: 771

Answers (1)

couzzi
couzzi

Reputation: 6366

data-over is the property; it's the value, if you have one, that gets put in quotes.

$('img[data-over]:eq(0)')

vs.

$('img[data-over="somevalue"]:eq(0)')

See this Fiddle for a demo.

Upvotes: 2

Related Questions