Sha256: 7024be20d86dbb61a0eef67743cdf2521e0874a4f3acf995a2ed762ce2389101
Contents?: true
Size: 909 Bytes
Versions: 68
Compression:
Stored size: 909 Bytes
Contents
(function() { var pageEl = '.multi-form'; function ready() { $(pageEl).on("click", '.next-page', handleContinue); }; $(document).on('page:change', ready); $(document).on('page:change', function() { $(document).on('ajax:success', pageEl, handleSubmitSuccess); }); function handleContinue() { $(this) .parent() .hide() .next(pageEl).show(); } function handleSubmitSuccess() { $(this) .hide() .next(pageEl).show(); if ($(this).attr("id")) { var id = $(this).attr("id") var challengingThought = $('#challenge'+id).val(); $('#challenging-thought'+id).text(challengingThought); } if (isTheLastForm.bind(this)()) { window.location.replace(window.location.origin + '/navigator/next_content'); } } function isTheLastForm() { return $(this).next(pageEl).length === 0; } })();
Version data entries
68 entries across 68 versions & 1 rubygems