[jQuery] Re: ajaxSubmit target append possible

2007-05-09 Thread juliandormon
Thanks Mike, You Rock! malsup wrote: > > >> $('#level1").prepend(data).SortableAddItem($('div.groupItem:eq(0)')); >> >> this is returning an object but not the ID. > > Just tack on attr to your selection. Something like this would probably > work: > > $('#level1').prepend(data).SortableAdd

[jQuery] Re: ajaxSubmit target append possible

2007-05-09 Thread Mike Alsup
$('#level1").prepend(data).SortableAddItem($('div.groupItem:eq(0)')); this is returning an object but not the ID. Just tack on attr to your selection. Something like this would probably work: $('#level1').prepend(data).SortableAddItem($('div.groupItem:eq(0)').attr('id')); Mike

[jQuery] Re: ajaxSubmit target append possible

2007-05-08 Thread juliandormon
Awesome that works. Perhaps you can help with this now :-) My ajax is returning a div with an id but I do not know what it is as it is generated by our DB. I do know it's class and I do know that it is the first div with that class because I prepend it to the existing data. I need to find this

[jQuery] Re: ajaxSubmit target append possible

2007-05-07 Thread Mike Alsup
If you're not using any other options on the ajaxSubmit call then you can just pass it a function to handle to the response text: $('#myForm').ajaxSubmit(function(text) { $('#myTarget').append(text); }); Otherwise you would use the "success" handler to do it. For example: var opts = { s