最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - jquery slider not working at all - Stack Overflow

programmeradmin2浏览0评论

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>

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>
Share Improve this question edited Jun 14, 2012 at 12:32 paercebal 83.5k38 gold badges134 silver badges160 bronze badges asked Mar 6, 2011 at 12:28 unicornunicorn 8672 gold badges9 silver badges13 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 10

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

<link rel="stylesheet" href="http://ajax.googleapis./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

发布评论

评论列表(0)

  1. 暂无评论