{"id":2,"date":"2024-11-10T10:50:19","date_gmt":"2024-11-10T10:50:19","guid":{"rendered":"https:\/\/plugship.swennijboer.nl\/?page_id=2"},"modified":"2024-11-19T18:36:01","modified_gmt":"2024-11-19T18:36:01","slug":"sample-page","status":"publish","type":"page","link":"https:\/\/plugship.swennijboer.nl\/?page_id=2","title":{"rendered":"Sample Page"},"content":{"rendered":"\n<p>This is an example page. It&#8217;s different from a blog post because it will stay in one place and will show up in your site navigation (in most themes). Most people start with an About page that introduces them to potential site visitors. It might say something like this:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>Hi there! I&#8217;m a bike messenger by day, aspiring actor by night, and this is my website. I live in Los Angeles, have a great dog named Jack, and I like pi\u00f1a coladas. (And gettin&#8217; caught in the rain.)<\/p>\n<\/blockquote>\n\n\n\n<div class=\"form-header\">\n    Test form ding\n\n    <div class=\"step-begin\">\n        Begin\n    <\/div>\n\n    <div class=\"step-simple\">\n        Simple\n    <\/div>\n\n    <div class=\"step-extend\">\n        <button id=\"button-simple\">Go to simple from extend<\/button>\n    <\/div>\n\n    <div class=\"step-multi\">\n        Multi\n    <\/div>\n\n    <button id=\"button-simple\">Simple<\/button>\n    <button id=\"button-extend\">Extend<\/button>\n    <button id=\"button-multi\">Multi<\/button>\n<\/div>\n\n<!-- <form id=\"enquiry_form\">\n    <label>Tekst<\/label>\n    <input type=\"text\" name=\"tekst\">\n\n    <button type=\"submit\">Submit<\/button>\n<\/form>\n\n\n<div class=\"step-0\">STEP_0_CONTENT_PLACEHOLDER<\/div>\n<div class=\"step-1\">STEP_1_CONTENT_PLACEHOLDER<\/div>\n\n<button id=\"prev-button\">Vorige<\/button>\n<button id=\"next-button\">Volgende<\/button> -->\n\n<script>\n    jQuery(document).ready(function($){\n        var stage = 'begin';\n        var totalStages = $('[class^=\"step-\"]').length; \/\/ Dynamically get total stages\n        console.log(totalStages, ' stages found');\n\n        \/\/ Init\n        goToDiv(stage);\n\n        \/\/ Go to next stage\n        $('button[id^=\"button-\"]').click(function(event) {\n            console.log('you clicked on: ', this);\n            var buttonId = this.id;\n            var stage = buttonId.replace('button-', '');\n            goToDiv(stage);\n        });\n\n        $(\"#enquiry_form\").submit(function(event) {\n            event.preventDefault();\n\n            var form = $(this);\n\n            $.ajax({\n                type: \"POST\",\n                url: \"https:\/\/plugship.swennijboer.nl\/index.php?rest_route=\/plugship\/v1\/form\/submit\",\n                data: form.serialize()\n            })\n        });\n\n        function goToDiv(i) {\n            \/\/ Check if the div exists\n            if ($('.step-' + i).length === 0) {\n                console.log('DEBUG: div with class .step-' + i + ' not found.');\n                return;\n            }\n\n            console.log('Div exist, going to step:  ', i);\n            $('[class^=\"step-\"]').hide(); \/\/ Hide all step divs\n            $('.step-' + i).show(); \/\/ Show current step div\n        }\n    \n    });\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>This is an example page. It&#8217;s different from a blog post because it will stay in one place and will show up in your site navigation (in most themes). Most people start with an About page that introduces them to potential site visitors. It might say something like this: Hi there! I&#8217;m a bike messenger [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-2","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/plugship.swennijboer.nl\/index.php?rest_route=\/wp\/v2\/pages\/2","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/plugship.swennijboer.nl\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/plugship.swennijboer.nl\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/plugship.swennijboer.nl\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/plugship.swennijboer.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2"}],"version-history":[{"count":2,"href":"https:\/\/plugship.swennijboer.nl\/index.php?rest_route=\/wp\/v2\/pages\/2\/revisions"}],"predecessor-version":[{"id":12,"href":"https:\/\/plugship.swennijboer.nl\/index.php?rest_route=\/wp\/v2\/pages\/2\/revisions\/12"}],"wp:attachment":[{"href":"https:\/\/plugship.swennijboer.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}