开发者

Jquery UI slider not working

My Jquery slider is not working.

Here is my header code:

<head>
  <link href="/stylesheets/public.css?1316972296" media="screen" rel="stylesheet" type="text/css" />
<link href="/stylesheets/tipTip.css?1263394346" media="screen" rel="stylesheet" type="text/css" />
      <script src="/javascripts/jquery.js?1316972671" type="text/javascript"></script>
<script src="/javascripts/jquery-ui.js?1316972675" type="text/javascript"></script>
<script src="/javascripts/jquery_ujs.js?1312204886" type="text/javascript"></script>
<script src="/javascripts/application.js?1316972551" type="text/javascript"></script>

              <script src="/javascripts/jquery.tablesorter.min.js?1314102048" type="text/javascript"></script>
<script src="/javascripts/jquery.tipTip.minified.js?1269274200" type="text/javascript"></script>
  <meta name="csrf-param" content="authenticity_token"/>
<meta name="csrf-token" content="OALn13CELwr3umFrj2BVDeLzw8VhZ2Hmjm/+g2SrGRs="/>
    <script type="text/javascript">



                $(document).ready(function() {

                       $("#slider").slider({
    value: 100,
    min: 0,
    max: 1000,
    step:开发者_如何学JAVA 100,
    slide: function(event, ui) {
        if (ui.value == $(this).slider('option', 'max')) {
            $(ui.handle).html('Ubegrænset');
            $('#sliderValue').val('99999');
        } else {
            $(ui.handle).html(ui.value);
            $('#sliderValue').val(ui.value);
        }
    }
}).find('a').html($('#slider').slider('value'));

$('#sliderValue').val($('#slider').slider('value'));

                                $('.tip').tipTip(defaultPosition: "top");


                });

  </script> 
</head>

And in my page I have:

<div id="slider"></div>
<input id="sliderValue" />


The following line is syntactically incorrect:

$('.tip').tipTip(defaultPosition: "top");

You probably mean:

$('.tip').tipTip({ defaultPosition: "top" });

Updated Sample: http://jsfiddle.net/andrewwhitaker/z3xV3/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜