jquery changes in forms with boat type
This commit is contained in:
@@ -83,18 +83,15 @@
|
||||
$( document ).ready(function() {
|
||||
$('#id_workouttype').on('change', function(){
|
||||
if (
|
||||
$(this).val() == 'rower'
|
||||
|| $(this).val() == 'skierg'
|
||||
|| $(this).val() == 'dynamic'
|
||||
|| $(this).val() == 'slides'
|
||||
|| $(this).val() == 'paddle'
|
||||
|| $(this).val() == 'bike'
|
||||
|| $(this).val() == 'snow'
|
||||
$(this).val() == 'water'
|
||||
|| $(this).val() == 'coastal'
|
||||
|| $(this).val() == 'c-boat'
|
||||
|| $(this).val() == 'churchboat'
|
||||
) {
|
||||
$('#id_boattype').toggle(true);
|
||||
} else {
|
||||
$('#id_boattype').toggle(false);
|
||||
$('#id_boattype').val('1x');
|
||||
} else {
|
||||
$('#id_boattype').toggle(true);
|
||||
}
|
||||
});
|
||||
$('#id_workouttype').change();
|
||||
|
||||
@@ -16,18 +16,15 @@
|
||||
$( document ).ready(function() {
|
||||
$('#id_workouttype').on('change', function(){
|
||||
if (
|
||||
$(this).val() == 'rower'
|
||||
|| $(this).val() == 'skierg'
|
||||
|| $(this).val() == 'dynamic'
|
||||
|| $(this).val() == 'slides'
|
||||
|| $(this).val() == 'paddle'
|
||||
|| $(this).val() == 'bike'
|
||||
|| $(this).val() == 'snow'
|
||||
$(this).val() == 'water'
|
||||
|| $(this).val() == 'coastal'
|
||||
|| $(this).val() == 'c-boat'
|
||||
|| $(this).val() == 'churchboat'
|
||||
) {
|
||||
$('#id_boattype').toggle(true);
|
||||
} else {
|
||||
$('#id_boattype').toggle(false);
|
||||
$('#id_boattype').val('1x');
|
||||
} else {
|
||||
$('#id_boattype').toggle(true);
|
||||
}
|
||||
});
|
||||
$('#id_workouttype').change();
|
||||
|
||||
@@ -76,25 +76,22 @@
|
||||
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
$('#id_workouttype').on('change', function(){
|
||||
if (
|
||||
$(this).val() == 'rower'
|
||||
|| $(this).val() == 'skierg'
|
||||
|| $(this).val() == 'dynamic'
|
||||
|| $(this).val() == 'slides'
|
||||
|| $(this).val() == 'paddle'
|
||||
|| $(this).val() == 'bike'
|
||||
|| $(this).val() == 'snow'
|
||||
) {
|
||||
$('#id_boattype').toggle(false);
|
||||
$('#id_boattype').val('1x');
|
||||
} else {
|
||||
$('#id_boattype').toggle(true);
|
||||
}
|
||||
});
|
||||
$('#id_workouttype').change();
|
||||
});
|
||||
$( document ).ready(function() {
|
||||
$('#id_workouttype').on('change', function(){
|
||||
if (
|
||||
$(this).val() == 'water'
|
||||
|| $(this).val() == 'coastal'
|
||||
|| $(this).val() == 'c-boat'
|
||||
|| $(this).val() == 'churchboat'
|
||||
) {
|
||||
$('#id_boattype').toggle(true);
|
||||
} else {
|
||||
$('#id_boattype').toggle(false);
|
||||
$('#id_boattype').val('1x');
|
||||
}
|
||||
});
|
||||
$('#id_workouttype').change();
|
||||
});
|
||||
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -23,18 +23,15 @@
|
||||
$( document ).ready(function() {
|
||||
$('#id_workouttype').on('change', function(){
|
||||
if (
|
||||
$(this).val() == 'rower'
|
||||
|| $(this).val() == 'skierg'
|
||||
|| $(this).val() == 'dynamic'
|
||||
|| $(this).val() == 'slides'
|
||||
|| $(this).val() == 'paddle'
|
||||
|| $(this).val() == 'snow'
|
||||
|| $(this).val() == 'bike'
|
||||
$(this).val() == 'water'
|
||||
|| $(this).val() == 'coastal'
|
||||
|| $(this).val() == 'c-boat'
|
||||
|| $(this).val() == 'churchboat'
|
||||
) {
|
||||
$('#id_boattype').toggle(true);
|
||||
} else {
|
||||
$('#id_boattype').toggle(false);
|
||||
$('#id_boattype').val('1x');
|
||||
} else {
|
||||
$('#id_boattype').toggle(true);
|
||||
}
|
||||
});
|
||||
$('#id_workouttype').change();
|
||||
|
||||
Reference in New Issue
Block a user