Skip to content

Instantly share code, notes, and snippets.

@Sentinel-7
Created September 21, 2020 15:27
Show Gist options
  • Save Sentinel-7/052630bc619174f6f6886afe93e21108 to your computer and use it in GitHub Desktop.
Save Sentinel-7/052630bc619174f6f6886afe93e21108 to your computer and use it in GitHub Desktop.
AjaxForm цели
<button type="submit" onclick="ga('send', 'zakazat_zvonok', '/'); ym(99999,'reachGoal','ostavit_zayavku'); return true;" class="bt_red" style="display: block;">
$(document).on("af_complete", function (event, response) {
var fid = response.form[0].id;
switch (fid) {
case 'question':
case 'online':
case 'modal_form':
case 'regForm':
if (response.success) {
const inst = $('[data-remodal-id=thanks-modal]').remodal();
inst.open();
}
break;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment