I have a java script function that allows me to drag and drop a div in my application.js application
$(function() {
$( ".draggable" ).draggable();
});
in my index file I have a bunch of divs with a draggable class,
<head>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
</head>
<div class="draggable">
<p><strong>Title:</strong>
<%= task.title %></p>
<p> <%= link_to 'Show', task, :class => 'text' %>
</div>
In addition, each div has a show option, which allows me to go to another page, and on other pages there is a "Back" button that allows me to return to my index page.
<%= link_to 'Back', tasks_url, :class => 'text' %>
but when I return to this page, I can no longer drag the div. If I refresh the page, I can drag the div again.
Is this a conveyor problem that I don't know about?
source
share