diff options
Diffstat (limited to 'assets/js/src/App.js')
-rw-r--r-- | assets/js/src/App.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/assets/js/src/App.js b/assets/js/src/App.js index 0ae437c0..cd5df66e 100644 --- a/assets/js/src/App.js +++ b/assets/js/src/App.js @@ -41,6 +41,19 @@ App.prototype.listen = function() { this.autoComplete(); this.datePicker(); this.focus(); + + $(document).on("click", ".ajax-replace", function(e) { + e.preventDefault(); + var el = $(this); + + $.ajax({ + cache: false, + url: el.attr("href"), + success: function(data) { + el.replaceWith(data); + } + }); + }); }; App.prototype.refresh = function() { |