Created
April 14, 2015 20:17
-
-
Save rclements/43a6765b8ec7cf3614dd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function removeTime(schedule_map_id, time_id, week, day) { | |
url = '/admin/schedule_maps/' + schedule_map_id + '/schedule_map_weeks/' + time_id | |
div = '#time_list_' + week + '_' + day | |
jQuery.ajax({ | |
beforeSend: function(xhr) {xhr.setRequestHeader('X-CSRF-Token', $('meta[name="csrf-token"]').attr('content'))}, | |
url: url, | |
type: 'delete', | |
dataType: 'json', | |
success: function(response) { | |
jQuery(div).html(response.responseText); | |
}, | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment