There is my problem: fiddle
$("#timeline").draggable({
axis: "x",
containment: [-2110, 0, 0, 0]
});
I made the simple draggable image but i want to add a slider like this http://jqueryui.com/slider/#side-scroll.
You don't need to use javascript for this unless you want a custom scroll bar or to be able to drag with your mouse (a touch device would work just fine, though). You can get away with simply putting the image in a container and just setting overflow: auto
on it.
http://jsfiddle.net/LMXLj/146/embedded/result/
If you want it to be draggable with a mouse, which isn't the most natural thing, you don't want to be using .draggable()
. You would want to look into a plugin like dragscroll.