I’m trying to get the content of a textarea inside a sortable item in jQuery… I can’t seem to figure it out! Here’s what I have now:
jQuery(document).ready(function() {
jQuery("#list").sortable({
axis : 'y' ,
revert : 'true' ,
opacity : 0.5 ,
stop : function (e, ui) {
jQuery("input#output");
}
});
});
This has to be so simple I’ll smack my own head when I find out how to do it, but saying that, I just can’t figure it out. Can anyone help?
ui in the stop function holds the just moved sortable at ui.item.
I also changed “#output” to “.output” because it is standard practice not to have multiple elements with the same id (assuming that there is a textbox with an id of output in each of your sortable items.) If they are similar elements, make them the same class instead.