# Other Languages > jQuery >  [RESOLVED] Draggable does not work after I do autopostback from a dropdown list.

## Jigabyte

Hi All,

I have a div which contains an image. At the start if I drag the div it works fine but when I select an item from a dropdown list which then assigns a different image to the div the drag stops working. The dropdown has autopostback so I can get the new image.

Any help please, very new to jquery  :Smilie: 

Jiggy!

PS. Here is my jquery. Also does it matter that the controls are in an updatepanel?



```
            <script type="text/javascript">
                $(function () {
                    $('#divPreview').draggable({ helper: "clone",
                        cursor: "move"
                    });
                }); 
            </script>
```

----------


## Jigabyte

I believe I need to use pageload. Can someone please help we with this. I understand that after the partial post back it loses the jquery function and need to use pageload but I can't seem to get the syntax correct.

----------


## Jigabyte

Sorted, here is my code:-

    <script type="text/javascript">
            function pageLoad(){
                $('#divPreview').draggable({ helper: "clone",
                    cursor: "move"
                });
                $('#divCleanTool1').droppable({
                    drop: function (event, ui) {
                        var $imagedrop = $('#divCleanTool1').find('img').map(function () {
                            var $imagedrag = $('#divPreview').find('img').map(function () {
                                return this.src;
                            }).get();
                            this.src = $imagedrag;
                        });
                    }
                });
            };
    </script>

----------

