Reputation: 61727
I have the following snippet:
var Bar = $('#' + this.container.attr('ID') + 'b' + barID);
var Marker = $("<div class='marker m" + styleID + "'>" + label + "</div>");
Bar.parent().append(Marker);
Marker.draggable(
{
axis: "x",
grid: [this.GridSize, this.GridSize]
}
);
This doesn't make the marker draggable as I want it to, is there any way to make it draggable without assigning it an ID?
Upvotes: 1
Views: 71
Reputation: 3765
You give the div
assigned to Marker
a class of marker mStyleId
so couldn't you just select it using one of those?
$(".m"+styleId).draggable();
Upvotes: 3