blob: da9552f05b6bd956f6ea25e9ec5e9610d84c9543 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
/*
* southampton.js
* FixMyStreet JavaScript for Southampton
*/
$(function(){
$('#form_category').change(function(){
var category = $(this).val();
if ('Potholes' == category) {
if (!$('#potholes_extra').length) {
var qns = '<div id="potholes_extra" style="margin:0; display:none;">' +
'<div class="form-field"><label for="form_size">Size:</label>' +
'<select name="detail_size"><option>-- Please select --<option>Unknown' +
'<option>Small: No larger than a dinner plate (up to 30cm/12inches)' +
'<option>Medium: No larger than a dustbin lid (up to 60cm/24inches)' +
'<option>Large: Larger than a dustbin lid (over 60cm/24inches)' +
'</select></div>' +
'<div class="form-field"><label for="form_depth">Depth:</label>' +
'<select name="detail_depth"><option>-- Please select --<option>Unknown' +
'<option>No deeper than a golf ball (up to 4cm/1.5inches)' +
'<option>No deeper than a tennis ball (up to 6.5cm/2.5inches)' +
'<option>Deeper than a tennis ball' +
'</select></div></div>';
$('#form_title').closest('div.form-field').after(qns);
}
$('#potholes_extra').show('fast');
} else {
$('#potholes_extra').hide('fast');
}
}).change();
});
|