[eluser]MCrittenden[/eluser]
If I understand your question correctly, an easy solution would be to change the following:
Code:
$(editform).appendTo(list);
into this:
Code:
$(editform).appendTo(list).css('display','none');
$(editform).slideDown();
All that does is creates the form but keeps it hidden, and then slides it into view. It seems a little hackish but it works. Just attach a click handler to the list items using something like:
Code:
$(document).ready(function(){
$('ul li').click(function() {
rollOutEditForm(this.id);
})
})
Is that what you were asking or did I misunderstand? I'm still a newbie at CI (first post by the way) but I've done a good bit of jQuery so I'll be glad to help if I misunderstood.
I'm not sure what you're going for with the editid in the last two lines so I wasn't able to test that, and you get some crazy things happening if you click the same <li> more than once, but those can be fixed (you can use slideToggle() instead of slideDown() and only appendTo() if there isn't a form already. That should fix that).