Skip to content

Instantly share code, notes, and snippets.

@gterrill
Created January 13, 2017 18:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gterrill/98035e54c107f6ddfd0a37f3524ebe55 to your computer and use it in GitHub Desktop.
Save gterrill/98035e54c107f6ddfd0a37f3524ebe55 to your computer and use it in GitHub Desktop.
Initialize the booking form when add to cart form is dynamically loaded by fancybox
// Call Fancybox for product modal + stop scroll to top
$('.product-modal').fancybox({
ajax: {
complete: function(jqXHR, textStatus) {
new bta.BookingForm(jQ("form[action^='/cart/add']").not('.bta-active'));
}
},
helpers: {
overlay: {
locked: false
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment