app/assets/javascripts/detour/delete_feature.js in detour-0.0.3 vs app/assets/javascripts/detour/delete_feature.js in detour-0.0.5

- old
+ new

@@ -1,13 +1,11 @@ -$(function () { - $('.delete-feature').on('click', function (e) { - var href = $(e.currentTarget).data('path'), - feature = $(e.currentTarget).closest('td').next().text(), - $modal = $('#delete-feature'), - $name = $modal.find('.feature-name'), - $link = $modal.find('a'); +$(document).on('click', '.delete-feature', function (e) { + var href = $(e.currentTarget).data('path'), + feature = $(e.currentTarget).closest('td').next().text(), + $modal = $('#delete-feature'), + $name = $modal.find('.feature-name'), + $link = $modal.find('a'); - $link.attr('href', href); - $name.text(feature.trim()); - $modal.modal('show'); - }); + $link.attr('href', href); + $name.text(feature.trim()); + $modal.modal('show'); });