当我从列表菜单中选择最后一个选项时,我使用此代码在我的联系表单中滑动另一个表单。整个表单有一个id="other"
。
如何编辑此代码以添加语句,当我点击彼此<option>
时,其他表单应该是slideUp(消失)。
<script>
$(document).ready(function(){
$("#other option:last-child").click(function(){
$("#wpcf7-f852-p27-o1 p:nth-child(3)").slideDown();
});
});
</script>
<div class="wpcf7" id="wpcf7-f852-p27-o1"><form action="/tailor-made-trips/#wpcf7-f852-p27-o1" method="post" class="wpcf7-form" novalidate="novalidate">
<div style="display: none;">
<input type="hidden" name="_wpcf7" value="852" />
<input type="hidden" name="_wpcf7_version" value="3.7.2" />
<input type="hidden" name="_wpcf7_locale" value="en_US" />
<input type="hidden" name="_wpcf7_unit_tag" value="wpcf7-f852-p27-o1" />
<input type="hidden" name="_wpnonce" value="2a5c0d3af6" />
</div>
<p>Type of Activity: <span class="wpcf7-form-control-wrap type-of-activity"><select name="type-of-activity" class="wpcf7-form-control wpcf7-select wpcf7-validates-as-required" id="other" aria-required="true" aria-invalid="false"><option value="">---</option><option value="Walking & Trekking">Walking & Trekking</option><option value="Mountain cycling">Mountain cycling</option><option value="Horse riding">Horse riding</option><option value="Cross country skiing">Cross country skiing</option><option value="Ski touring">Ski touring</option><option value="Winter trekking">Winter trekking</option><option value="Mountains & Music">Mountains & Music</option><option value="Outdoor : Adventure & Survival">Outdoor : Adventure & Survival</option><option value="Other">Other</option></select></span> </p>
<p> Here you can describe your wishes: <br /> <span class="wpcf7-form-control-wrap textarea-940"><textarea name="textarea-940" cols="40" rows="10" class="wpcf7-form-control wpcf7-textarea wpcf7-validates-as-required" id="special-wishes" aria-required="true" aria-invalid="false"></textarea></span> </p>
<p>Trip Info <span class="wpcf7-form-control-wrap trip-info"><span class="wpcf7-form-control wpcf7-radio"><span class="wpcf7-list-item first"><input type="radio" name="trip-info" value="centre based" /> <span class="wpcf7-list-item-label">centre based</span></span><span class="wpcf7-list-item"><input type="radio" name="trip-info" value="point - to - point" /> <span class="wpcf7-list-item-label">point - to - point</span></span><span class="wpcf7-list-item last"><input type="radio" name="trip-info" value="mixed" /> <span class="wpcf7-list-item-label">mixed</span></span></span></span></p>
<p>Activity level: <span class="wpcf7-form-control-wrap activity-level"><span class="wpcf7-form-control wpcf7-checkbox"><span class="wpcf7-list-item first"><input type="checkbox" name="activity-level[]" value="easy" /> <span class="wpcf7-list-item-label">easy</span></span><span class="wpcf7-list-item"><input type="checkbox" name="activity-level[]" value="easy/moderate" /> <span class="wpcf7-list-item-label">easy/moderate</span></span><span class="wpcf7-list-item"><input type="checkbox" name="activity-level[]" value="moderate" /> <span class="wpcf7-list-item-label">moderate</span></span><span class="wpcf7-list-item"><input type="checkbox" name="activity-level[]" value="moderate/challenging" /> <span class="wpcf7-list-item-label">moderate/challenging</span></span><span class="wpcf7-list-item"><input type="checkbox" name="activity-level[]" value="challenging" /> <span class="wpcf7-list-item-label">challenging</span></span><span class="wpcf7-list-item last"><input type="checkbox" name="activity-level[]" value="challenging/though" /> <span class="wpcf7-list-item-label">challenging/though</span></span></span></span></p>
<p>Prefferred dates<br /> <span class="wpcf7-form-control-wrap kalendarz"><input type="text" name="kalendarz" value="" size="40" class="wpcf7-form-control wpcf7-date wpcf7-validates-as-required" aria-required="true" /> </span><br />
<br />Duration: <span class="wpcf7-form-control-wrap duration"><input type="number" name="duration" value="" class="wpcf7-form-control wpcf7-number wpcf7-validates-as-number" min="1" step="1" aria-invalid="false" /></span></p>
<p>Board: <span class="wpcf7-form-control-wrap wyzywienie"><span class="wpcf7-form-control wpcf7-radio"><span class="wpcf7-list-item first"><input type="radio" name="wyzywienie" value="BB" /> <span class="wpcf7-list-item-label">BB</span></span><span class="wpcf7-list-item"><input type="radio" name="wyzywienie" value="HB" /> <span class="wpcf7-list-item-label">HB</span></span><span class="wpcf7-list-item last"><input type="radio" name="wyzywienie" value="FB" /> <span class="wpcf7-list-item-label">FB</span></span></span></span></p>
<p>Special requests: <span class="wpcf7-form-control-wrap Specialrequests"><input type="text" name="Specialrequests" value="" size="40" class="wpcf7-form-control wpcf7-text" aria-invalid="false" /></span></p>
<p>Accommodation standard: <span class="wpcf7-form-control-wrap zakwaterowanie"><span class="wpcf7-form-control wpcf7-checkbox"><span class="wpcf7-list-item first"><input type="checkbox" name="zakwaterowanie[]" value="touristic/guest houses/moutain lodges" /> <span class="wpcf7-list-item-label">touristic/guest houses/moutain lodges</span></span><span class="wpcf7-list-item"><input type="checkbox" name="zakwaterowanie[]" value="**" /> <span class="wpcf7-list-item-label">**</span></span><span class="wpcf7-list-item"><input type="checkbox" name="zakwaterowanie[]" value="***" /> <span class="wpcf7-list-item-label">***</span></span><span class="wpcf7-list-item"><input type="checkbox" name="zakwaterowanie[]" value="****" /> <span class="wpcf7-list-item-label">****</span></span><span class="wpcf7-list-item last"><input type="checkbox" name="zakwaterowanie[]" value="*****" /> <span class="wpcf7-list-item-label">*****</span></span></span></span> </p>
<p>In case of the "point-to-point" event type, standard of accommodation is dependent on the route and time and may be different every day hotels of categories 4* and 5* are available only in case of "centred based" event type also in specific destinations.</p>
<p>Do you accept chairlifts? <span class="wpcf7-form-control-wrap wyciagi"><span class="wpcf7-form-control wpcf7-radio"><span class="wpcf7-list-item first"><input type="radio" name="wyciagi" value="Yes" /> <span class="wpcf7-list-item-label">Yes</span></span><span class="wpcf7-list-item last"><input type="radio" name="wyciagi" value="No" /> <span class="wpcf7-list-item-label">No</span></span></span></span> </p>
<p>Estimated budget per person: <span class="wpcf7-form-control-wrap budzet"><input type="text" name="budzet" value="" size="40" maxlength="7" class="wpcf7-form-control wpcf7-text" aria-invalid="false" /></span> </p>
<h3>PARTICIPANT'S INFO</h3>
<p>Number of participants (min. 6, max. 25 people): <span class="wpcf7-form-control-wrap liczba-uczestnikow"><input type="number" name="liczba-uczestnikow" value="" class="wpcf7-form-control wpcf7-number wpcf7-validates-as-number" min="2" aria-invalid="false" /></span></p>
<p>adults: <span class="wpcf7-form-control-wrap dorosli"><input type="number" name="dorosli" value="" class="wpcf7-form-control wpcf7-number wpcf7-validates-as-number" aria-invalid="false" /></span></p>
<p>children (till 12 y.o.): <span class="wpcf7-form-control-wrap children-to12"><input type="number" name="children-to12" value="" class="wpcf7-form-control wpcf7-number wpcf7-validates-as-number" aria-invalid="false" /></span> </p>
<p>special requests: <span class="wpcf7-form-control-wrap special-request"><input type="text" name="special-request" value="" size="40" class="wpcf7-form-control wpcf7-text" aria-invalid="false" /></span> </p>
<h2>Group leader's details</h2>
<p>title: <span class="wpcf7-form-control-wrap title"><input type="text" name="title" value="" size="40" class="wpcf7-form-control wpcf7-text" aria-invalid="false" /></span></p>
<p>first name: <span class="wpcf7-form-control-wrap first-name"><input type="text" name="first-name" value="" size="40" class="wpcf7-form-control wpcf7-text" aria-invalid="false" /></span></p>
<p>surname: <span class="wpcf7-form-control-wrap surname"><input type="text" name="surname" value="" size="40" class="wpcf7-form-control wpcf7-text" aria-invalid="false" /></span></p>
<p>email adress: <span class="wpcf7-form-control-wrap email-opiekuna"><input type="email" name="email-opiekuna" value="" size="40" class="wpcf7-form-control wpcf7-text wpcf7-email wpcf7-validates-as-email" aria-invalid="false" /></span></p>
<p>country: <span class="wpcf7-form-control-wrap country"><input type="text" name="country" value="" size="40" class="wpcf7-form-control wpcf7-text" aria-invalid="false" /></span></p>
<p>town: <span class="wpcf7-form-control-wrap town"><input type="text" name="town" value="" size="40" class="wpcf7-form-control wpcf7-text" aria-invalid="false" /></span></p>
<p>Captcha</p>
<p><input type="hidden" name="_wpcf7_captcha_challenge_spam" value="2100886002" /><img class="wpcf7-form-control wpcf7-captchac wpcf7-captcha-spam" width="72" height="24" alt="captcha" src="http://wanderer.ventostudio.eu/wp-content/uploads/wpcf7_captcha/2100886002.png" /><br />
<span class="wpcf7-form-control-wrap spam"><input type="text" name="spam" value="" size="40" class="wpcf7-form-control wpcf7-captchar" aria-invalid="false" /></span></p>
<p><input type="submit" value="Send" class="wpcf7-form-control wpcf7-submit" /></p>
<div class="wpcf7-response-output wpcf7-display-none"></div></form></div>
<div></div>
</span>
</div>