From 73c401e5a1a4f7dd6ae9fd60a28943e359a35f70 Mon Sep 17 00:00:00 2001 From: Menci Date: Mon, 10 Jul 2017 11:38:54 +0800 Subject: [PATCH] Fix post event binding --- static/script.js | 2 +- views/footer.ejs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/static/script.js b/static/script.js index 3de547e..1aa6db4 100644 --- a/static/script.js +++ b/static/script.js @@ -9,7 +9,7 @@ var addUrlParam = function (url, key, val) { }; $(function () { - $('a[href-post]').click(function (e) { + $(document).on('click', 'a[href-post]', function (e) { e.preventDefault(); var form = document.createElement('form'); diff --git a/views/footer.ejs b/views/footer.ejs index 1879604..94cc3df 100644 --- a/views/footer.ejs +++ b/views/footer.ejs @@ -7,6 +7,6 @@ - +