tags:

views:

20

answers:

1

I want to add an image after I drop it into a paragraph. I could add the image into the paragraph, but I want it to be dropped either before the first line of the paragraph starts or after it ends, because I want it to have the text floated properly around it. I'm trying this code:

$('.textElementClass').droppable({
    accept: '.imageElement',
    tolerance: 'pointer',
    drop: function (e, ui) {
        $(this).css({'height':'400px'});
        $(this).append(ui.draggable);
    }
});

Thanks

A: 

prepend worked :)

KutePHP