I am currently creating a section on my website which is designed to let users create their own workout planner. I have a div with an ID of draggable_exercises in which generates a list of draggable exercises and below that div I have multiple dives with the CLASS of droppable days which has JqueryUI's droppable() assigned to each of them. The user can then drag and drop the exercises into the days and generate their custom workout plan.

I was using a PHP while loop directly on the page to generate the data and I was using JqueryUI to make them draggable. I recently decided to start using AJAX to generate the data but after doing so, now the Jquery UI has stopped worrking and the exercises are no longer draggable and I can't figure out how to fix it. I have watched video tutorials about .on() and .delegate() but I can't figure out the correct syntax to make it work with my code.

Here is the JQuery currently being used to generate the data in an AJAX style.
	//Displays a list of draggable exercises in workout_planner.pnp
		var category = $(this).text();
		$.get('../ajax/list_exercises.php',{category: category},function(data){
Here is the PHP file (which is not directly on the page anymore) which sends the data back to javascript so that it's displayed on the page.

<?php require_once('../includes/functions.php');?>
<?php require_once('../includes/query_functions.php');?>
<?php /* The variables set in this PHP block are for displaying the category name for selected draggable exercises.*/
		$category = isset($_GET['category']) ? $_GET['category'] : "all exercises";
		$category_set = get_exercise_categories($category);
		$selected_category = mysql_fetch_array($category_set);
		$category_id = $selected_category['id'];
	$output = "<h4>{$selected_category["title"]}</h4>";
	$output .= "<ul>";
	$exercises = get_all_exercises();
	 while($exercise = mysql_fetch_array($exercises)) {
     	$categories = explode('~',$exercise['categories']);
	 		if(in_array($category_id,$categories)) {
     $output .= "<li class=\"drag_ex\">{$exercise["title"]}</li>"; 
		}//Ends the if in_array()
	}//Ends the while loop
$output .="</ul>";
echo $output;