UI Sortable how to access affected elements

UI Sortable how to access affected elements


Hello,
i'm new in JQuery.
could anyone help me to understand how to get access to the affected
elements ?
so for example change was made
    $("#axcontainer").sortable({
                                    items: ".container",
                                    hoverClass: "hover",
                                    update: function(e, ui){ WHAT SHOULD BE HERE ?}
    })
i have elements like:
<div id="axcontainer">
    <div id="container1" class="container">
        <input type="input" name="blk1" value="block1">
    </div>
    <div id="container2" class="container">
        <input type="input" name="blk2" value="block2">
    </div>
</div>
so lets imagine they were changed ... how can i access to the input
fields of the BOTH changed elements to for example to change block2 to
block1 and block1 value to change to block2 ....
wasted 2 hrs ... without any results ... i have no idea :((( i'm new
in JQuery :\
also what does it means "e, ui" inside function(e, ui) ... e = event
ui = user interface ? :\