I'm making a jQuery plugin that creates a scrollable div. You are able to scroll up and down using a div on the right hand side. The problem is that my draggable div seems to be quite juddery when moving it.
A full example of what I'm trying is here: http://jsfiddle.net/j8Hqq/1/
I think the offending code will be in here:
.mousemove(function(e) { if(being_dragged) { scroller_y = e.pageY - $(this).offset().top; if(scroller_y < 0) scroller_y = 0; else if(scroller_y > $this.height() - $(this).height()) scroller_y = $this.height() - $(this).height(); } $(this).css({ top: scroller_y }); $('#custom-scroll-children').scrollTop(scroller_y); }); I was thinking about implementing jQuery-ui.draggable into it, but didn't want a large library attached to the plugin.
Thanks,