Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
-3
rated 0 times [  4] [ 7]  / answers: 1 / hits: 16346  / 11 Years ago, sat, march 16, 2013, 12:00:00

Here is what I have in HTML:



<!DOCTYPE html>
<html>
<head>

<script type=text/javascript src=/static/jslibs/jquery-ui-1.10.2.custom/css/ui-lightness/jquery-ui-1.10.2.custom.css></script>

<title>test</title>
</head>
<body>

</body>
</html>


And here is what I got with it:



Uncaught SyntaxError: Unexpected token . 
...Here code caused exception...
.ui-helper-hidden {
display: none;
}


Does anybody familiar with it?


More From » jquery

 Answers
152

You're confusing js files and css files.



You're using a script element to import a css file, hence the error. JQuery UI needs both a CSS file and a JS file, and they must be imported in separate elements. It should look like this :



<link type=text/css href=lib/jquery/ui-darkness/jquery-ui-1.8.21.custom.css rel=stylesheet /> 
<script charset=UTF8 src=jquery.min.js></script>
<script charset=UTF8 src=lib/jquery/jquery-ui-1.9.0.custom.min.js></script>

[#79552] Friday, March 15, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
mitchell

Total Points: 95
Total Questions: 110
Total Answers: 87

Location: Gabon
Member since Thu, Jul 15, 2021
3 Years ago
;