<script type="text/
javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/ui.core.min.js"></script>
<script type="text/javascript" src="js/ui.slider.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
var $contain = $(".drag_ul", $(".drag"));
var $items = $("li", $(".drag .drag_ul"));
var $dragCont = $(".drag_cont", $(".drag"));
var $button = $(".drag_cont_btn", $(".drag"));
var width = ($items.length * parseInt($items.outerWidth(true)));
$contain.css("width", width);
var sliderOpts = {
max: width - parseInt($dragCont.css("width")),
slide: function(e, ui) {
$contain.css("left", "-" + ui.value + "px")
}
};
$button.slider(sliderOpts);
});
</script>