2

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?

1
  • Don't try to bring in CSS files with a script tag. Also you need jQuery for jQuery-UI Commented Mar 16, 2013 at 19:04

1 Answer 1

35

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>
Sign up to request clarification or add additional context in comments.

3 Comments

Indeed, apparently I was blind
really i need some new glasses
What? Yesssss :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.