我有以下脚本,它将一些按钮(现在是假按钮)添加到 div:
$("<div class='divButtons'>").appendTo( $(this).closest(".widget").find(".widget_header") );
// not real buttons, just text at the moment. Trying to get the position right first.
$(".divButtons").text("(close), (min), (max), (help)").css({background:"red",float:"right"});
问题是,我不知道如何让 的右上角将divButtons
自己定位到 parent 的右上角.widget_header
。我试过添加top:some_number_here
,但是用 jQueries 移动 div 时效果不佳ui-sortable
。