$("#search_courses_result_list").html("");
$("#search_courses_result_list").append('<ul class="ml5">');

<% @courses.each do |course|%>
link = "<li><label><input type='checkbox'class='mr5 fl mt3' name='courseNames[]' value='<%=course.id%>'/><span class='search_org fl'> <%=course.name %> </span></label></li><div class='cl mt5'></div>";
$("#search_courses_result_list").append(link );
<%end %>
$("#search_courses_result_list").append('</ul>')

