ドロップ可能にドロップされた後、divにパラメーターを追加しようとしています。パラメータを追加できる以下のaddParameterに似たメソッドはありますか?
$( ".placeHolder" ).droppable({ drop: function( event, ui )
{
"#"+this.id.addParameter(myParam="testParam");
}
ドロップ可能にドロップされた後、divにパラメーターを追加しようとしています。パラメータを追加できる以下のaddParameterに似たメソッドはありますか?
$( ".placeHolder" ).droppable({ drop: function( event, ui )
{
"#"+this.id.addParameter(myParam="testParam");
}
関数を使用し.attr()
ます。属性を設定するには、
$(this).attr('my_attribute', 'my_value');
そしてそれを使用するために
$(this).attr('my_attribute');
If you mean setting the attribute to the draggable element, then you can use:
$(".placeHolder").droppable({
drop: function(event, ui) {
ui.draggable.attr("myParam", "testParam");
}
});
Otherwise, just use ui.draggable
as a jQuery object of the draggable element.