I have a dropdown which has select by default in it.
If now user selects any other value other than select for the first time my change event should not be triggeredand my change event should work from second time.
Is there any way to do this.
<select id="ddl1" class="width94P selectHeight" onchange="onPhConsentFormSelect()">
<option value="-1"> Select </option>
<option value="0" title="2">Samsung</option>
<option value="1" title="3">Oppo</option>
<option value="2" title="4">Real Me</option>
</select>
what i tried
$("#ddl1").on('change', function () {
if ($("#ddl1").val() != "-1") {
$('#txtmode').val('');
$('#txtcolor').val('');
$('#txtcustomization').val('');
$('#txtexpecteddate).val('');
}
});
currently my trigger change event which i had written is working from the first time of drop down selection change only but it should work from second time.