1
私は、チェックボックスをオンにしたときにのみ、一部のフィールドが表示されるようなフォームを持っています。私はIntroJSデモを使ってユーザーを歩きたい。IntroJSの条件ステップ
イントロJSに条件付きステップを追加できる方法はありますか?
手順の定義方法は次のとおりです。 ステップ4は、特定のチェックボックスがオンになっている場合にのみ表示されます。ここで
intro.setOptions({
steps: [
{
intro: "Hi! Lets start personilizing your settings. Click 'Next' to begin."
},
{
element: document.querySelector('#step1'),
intro: "Enter the email address where you would like to receive alerts. (for multiple user semi colon ';' as separator)",
},
{
element: document.querySelectorAll('#step2')[0],
intro: "Select your time zone.",
position: 'left'
},
{
element: '#step3',
intro: 'Turn \"On\" to receive payment reminder alerts.',
position: 'left'
},
{
element: '#step4',
intro: 'Select a \"Fee Type\". (The setting defines the type of fee to be applied to past due accounts.)'
}
]
});
手順JSONはそうあなただけ動的にしたいの手順でJSONオブジェクトを作成し、ステップにそれを渡すことができるオブジェクトを受け入れます。私はコンピュータの前にいるときに回答を投稿します。 – Carl