I'm working on a MVC application, containing a search input. The controller sends to the view a list of items that start with the letters present in the input.
My problem is that I want this received items (with the class .suggest
) to be draggable, with a clone helper. If I use the following code in the $(document).ready
function
$(".suggest").draggable({
helper: 'clone'
});
the items are not draggable. I suppose this is because the items have been loaded after the page loading?
If I add the class .ui-draggable
in the HTML code of the items, it doesn't work neither.
Is there a solution to drag elements loaded by a controller?