Hope this message finds you well,
Do not use mouseup, this is like doing patchwork to something that already has that function.
You need to bind a function to the "draggable" element's event.
This event is likely to be something like "on update" or "update"... as I just found out below, in your case you need the
stop, or
dragstop event.
Google "jQuery draggable" and you will find a page that has tabs for source code and other details. On that page, they list all events and how to bind functions to them. That's pretty much what a plug-in is for, they provide you a number of events.
So, start thinking in terms of events

Just figure out what they are and how to bind them to a function that does whatever.
This function is usually passed a parameter that contains some data about the "target" element, like mouse position x/y, etc.
here is a little help directly from jQuery documentation of draggable, under "Events" tab:
Code:
//Event: stop Type:dragstop
//This event is triggered when dragging stops.
//Code examples
//Supply a callback function to handle the stop event as an init option.
$( ".selector" ).draggable({
stop: function(event, ui) { ... }
});
//Bind to the stop event by type: dragstop.
$( ".selector" ).bind( "dragstop", function(event, ui) {
...
});
Use one of those ways to determine when the dragging has stopped, and event + ui parameters will contain the objects/data you need.