8000 using event delegation · SofHad/symfony@86d4f1c · GitHub
[go: up one dir, main page]

Skip to content

Commit 86d4f1c

Browse files
ycerutojaviereguiluz
authored andcommitted
using event delegation
1 parent d731ee8 commit 86d4f1c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/Resources/views/base.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@
155155
$(document).ready(function() {
156156
hljs.initHighlightingOnLoad();
157157
158-
$('form[data-confirmation-message]').on('submit', function (event) {
158+
$('body').on('submit', 'form[data-confirmation-message]', function (event) {
159159
var message = $(this).data('confirmation-message');
160160
161161
if (confirm(message) === false) {

0 commit comments

Comments
 (0)
0