Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jquery slider not working at all

I'm trying to use jquery's slider and nothing seems to happen

any ideas why?

<html>
<head>
  <script src="jquery-1.4.2.min.js"></script>
  <script src="jquery-ui.js"></script>
  <style type="text/css">
    #myslider { width: 200px; height: 200px; padding: 0.5em; float: left; margin: 10px; background: blue }
   </style>

<SCRIPT type=text/javascript>
    $(function() {
        $("#myslider").slider();
    });
    </SCRIPT>

</head><body>
<div id="myslider"></div>


</body>
</html>
like image 490
unicorn Avatar asked Mar 06 '11 12:03

unicorn


1 Answers

I think what is missing is the theme/css file:

<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/themes/base/jquery-ui.css" type="text/css" media="all" />

I tried your code and it works fine.

Regards

like image 87
Zakaria Avatar answered Sep 26 '22 23:09

Zakaria