I am trying to display only one task at a time. When the user clicks on "skip", the next task should be shown. This could range from a list of 3 tasks to a list of 30 tasks.
So how can I display only one task at a time?
$("a#skip").click(function() {
$('#id_task_{{i.id}}').hide('slide', { direction: 'left' }, 400);
};
<div id="reload">
<div class="task" id="id_task_1">
<a href="link to task" class="image">
Task 1
</a>
<a class="skip_class" id="skip">Skip</a>
</div>
<div class="task" id="id_task_2">
<a href="link to task" class="image">
Task 2
</a>
<a class="skip_class" id="skip">Skip</a>
</div>
</div>
Check out this Fiddle for a better understanding of what I'm working on. Thank you for your assistance.