I'm new to jquery and i'm wondering if the following thing is possible. I would like to get the name of the jquery object (in this case resizable and the attached key) to the handledragstop function. There are multiple resizableimage objects on the page, all have a unique number and i want to create a two text field with a name corresponding to the resizableimage name and add the position info to this after each drag.
$(document).ready(function(){
$(".resize").resizable().parent().draggable({stack: "div", stop:handleDragStop});
});
function handleDragStop( event, ui) {
var offsetXPos = parseInt( ui.position.left );
var offsetYPos = parseInt( ui.position.top );
//Basically my question is if i can use the div id here after it is called from the jquery script ?
}
<div id="resizable1" class="resize"></div>
<div id="resizable2" class="resize"></div>
<div id="resizable3" class="resize"></div>
etc.
Anyone has any idea how this can be done? I can't seem to think of anything.
Kind Regards, Zooibak