jQuery UI droppable

jQuery UI droppable

Normally, a droppable function drops "text element" to a droppable div


/////////////////////////////example///////////////////////////////////
$("#cart ol").droppable({
            activeClass: "ui-state-default",
            hoverClass: "ui-state-hover",
            accept: ":not(.ui-sortable-helper)",
            drop: function(event, ui) {
                $(this).find(".placeholder").remove();
                $("<li></li>").text(ui.draggable.text()).appendTo(this);

            }
})
///////////////////////////////////////////////////////////////////////////

My question is: Can I also drop a hidden input to a droppable div? (<input type="hidden...)


Recently i am creating a shopping cart that will only fire up the database  when everything is dragged into my droppable cart. Therefore, I need to drag and drop the hidden input to my shopping cart.(<input type="hidden...)

$("<li></li>").text(ui.draggable.text()).appendTo(this);   <-----this line of code has to change because it only drops TEXT value


I will be looking forward to your answers.