Markiert: JavaScript

Load formular with ajax and display it in fancybox lightbox

Just a code snippet: The link: <a href="#" id="the-opener-link" data-url="/link/to/form">Open form</a> The JavaScript: $('#the-opener-link').click(function(event) { $.fancybox.open({ href:$(this).attr('data-url'), type: 'ajax', afterShow: function() { $(".fancybox-inner form").bind("submit", function () { $.fancybox.showLoading(); $.ajax({ type: "POST", cache: false, url:...