I've been struggling to achieve this! We don't want an extra dependency hence not using UI draggable.
Whatever I tried is over here: http://jsfiddle.net/wSTcJ/
<div id="cont">
<div id="test">
</div>
<div id="test2">
</div>
<div id="drag">
</div>
</div>
And the jQuery code is in the Fiddle.
The first div is under the second. The second one's width is kept to 0, now when I drag the drag bar, I want to adjust the width of this div, revealing its content and thus overlapping the first one's content. My code allows me to drag, but stops after some time and doesn't drag from the right to left!
Any ideas to make it working?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…