Tyler DeWitt
Tyler DeWitt

Reputation: 23576

jQuery UI Slider Not Appearing

I thought the basic syntax for a slider was:

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

$("#slider").slider()

But that doesn't make a visible slider. Inspecting the div element, I see that some stylings were applied, but the slider isn't visible.

Here's a fiddle: http://jsfiddle.net/yqNcn/

Upvotes: 11

Views: 13349

Answers (2)

Mani Kasi
Mani Kasi

Reputation: 240

First Import your javascript Files* jquery.s and import Jquery UI widget Jquery-ui.js Then Put Your Css Div Tag with id <div id="slider"></div> this Example

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

then Call Jquery slider function....

<script>
$(function() {
$( "#slider" ).slider();
});
</script>

Upvotes: 0

Jon
Jon

Reputation: 437774

You have not included the CSS for jQuery UI so classes are applied but styles are not (there are actually none to apply). Here's an edited fiddle that includes the styles (look at the Resources panel); the slider is visible as it should be.

Upvotes: 16

Related Questions