scroll not working when using jQuery draggable in codeigniter

i am using jQuery draggable and droppable.

these are the scripts used.

$(function () {

        $("#dragdiv .drag_pet").draggable(
                    scroll: true,
                    containment: "document",
                    //containment: "window",
                    revert: true,
                    revertDuration: 200

when i am dragging an element to top, i can drag wherever in the screen that fits to my device width.when trying to drag above that the scroll is not working.what to do?