views:

162

answers:

2

I'm trying to implement a jQuery slider with increments. I've gone from, the actual project page, to a test page of the project with just the slider, to just the slider. In all cases I've been unable to get the handle to move. It also seems to have a width of 1px or similar.

My code is as follows,

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
<html>
    <head>
        <title>jQuery slider</title>

        <link rel="stylesheet" href="css/ui-lightness/jquery-ui-1.8.custom.css" type="text/css" media="screen" charset="utf-8" />

        <script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
        <script type="text/javascript" src="js/jquery-ui-1.8.custom.min.js"></script>

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

    </head>
    <body>
        <div id="slider"></div>
    </body>
</html>

I'm sure there is something very simple at fault here, but I really cannot see it for the life of me. The custom part of my download, was just clicking the 'select all components'.

A: 

i don't think the slider will show if there is no content and no fixed height ... dry this:

<div id="slider" style="width: 300px; height: 200px">
    // Put a huge lorem ipsum text here ;) 
</div>
Nexum
A: 

Hey,

I tried your exact code in a .html file...only replacing your includes with:

<link rel="stylesheet" type="text/css" media="screen" href="/css/ui-lightness/jquery-ui-1.7.2.bluetie.css" /> 
<script type="text/javascript" src="/js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="/js/jquery-ui-1.7.2.custom.min.js"></script>   

...and it worked...slider across the entire screen...easily movable...

non of my files were modified from what I got off the jquery site....

If you are not getting a javascript error,...my guess is that your .css file isn't being included.

Hope this helps, Andrew

Andrew
I redownloaded the a whole new package from the site and it magically worked! I guess my files were b0rk3d, d'oh
DavidYell